mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
MSVC 2015 compatibility.
This commit is contained in:
parent
45ec61f419
commit
5bb38c10b3
@ -112,7 +112,9 @@ struct RescuingDeleter {
|
||||
explicit RescuingDeleter(PyWrapper *pyw) : pyw{pyw} {}
|
||||
void operator()(ToBeWrapped *raw_ptr) {
|
||||
if (pyw->self.get() != nullptr) {
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1912
|
||||
assert(raw_ptr->weak_from_this().expired()); // CRITICAL
|
||||
#endif
|
||||
pyw->wobj = std::shared_ptr<ToBeWrapped>(raw_ptr, *this);
|
||||
pyw->self.reset();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user