diff --git a/include/pybind11/detail/smart_holder_poc.h b/include/pybind11/detail/smart_holder_poc.h index 70e4e2da0..06df06008 100644 --- a/include/pybind11/detail/smart_holder_poc.h +++ b/include/pybind11/detail/smart_holder_poc.h @@ -108,7 +108,7 @@ guarded_delete make_guarded_builtin_delete(bool armed_flag) { template struct guarded_custom_deleter : guarded_operator_call { explicit guarded_custom_deleter(bool armed_flag) : guarded_operator_call{armed_flag} {} - virtual void operator()(void *raw_ptr) override { + void operator()(void *raw_ptr) override { if (armed_flag) D()((T *) raw_ptr); }