mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-01 07:40:31 +00:00
Removing std::get_deleter
const_cast
to retest because the code has changed significantly. (#3045)
This commit is contained in:
parent
4f61912646
commit
840eb84aff
@ -195,8 +195,7 @@ struct smart_holder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void reset_vptr_deleter_armed_flag(bool armed_flag) {
|
void reset_vptr_deleter_armed_flag(bool armed_flag) {
|
||||||
// The const_cast is only for certain compilers (Ubuntu 20 GCC 6.3.0 being one).
|
auto vptr_del_ptr = std::get_deleter<guarded_delete>(vptr);
|
||||||
auto vptr_del_ptr = const_cast<guarded_delete *>(std::get_deleter<guarded_delete>(vptr));
|
|
||||||
if (vptr_del_ptr == nullptr) {
|
if (vptr_del_ptr == nullptr) {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"smart_holder::reset_vptr_deleter_armed_flag() called in an invalid context.");
|
"smart_holder::reset_vptr_deleter_armed_flag() called in an invalid context.");
|
||||||
|
Loading…
Reference in New Issue
Block a user