Removing std::get_deleter const_cast to retest because the code has changed significantly. (#3045)

This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-06-17 13:13:21 -07:00 committed by GitHub
parent 4f61912646
commit 840eb84aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,8 +195,7 @@ struct smart_holder {
}
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 = const_cast<guarded_delete *>(std::get_deleter<guarded_delete>(vptr));
auto vptr_del_ptr = std::get_deleter<guarded_delete>(vptr);
if (vptr_del_ptr == nullptr) {
throw std::runtime_error(
"smart_holder::reset_vptr_deleter_armed_flag() called in an invalid context.");