diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 26977f020..00c5c0e0f 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1302,9 +1302,10 @@ public: record.default_holder = holder_is_smart_holder; #if 0 static constexpr bool type_caster_type_is_smart_holder_type_caster = detail::is_smart_holder_type_caster::value; + static constexpr bool type_caster_type_is_type_caster_base_subtype = std::is_base_of, detail::type_caster>::value; static_assert(!(detail::is_instantiation::value && type_caster_type_is_smart_holder_type_caster)); static_assert(!(detail::is_instantiation::value && type_caster_type_is_smart_holder_type_caster)); - static_assert(holder_is_smart_holder == type_caster_type_is_smart_holder_type_caster); + static_assert(!(holder_is_smart_holder && type_caster_type_is_type_caster_base_subtype)); #endif #endif set_operator_new(&record);