diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index efb460b1f..9d3fd5def 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1506,17 +1506,16 @@ public: } private: - template >::value, - int> = 0> + template < + typename T = type, + detail::enable_if_t::value, int> = 0> void generic_type_initialize(const detail::type_record &record) { generic_type::initialize(record, &detail::type_caster_generic::local_load); } template < typename T = type, - detail::enable_if_t::is_smart_holder_type_caster::value, int> = 0> + detail::enable_if_t::value, int> = 0> void generic_type_initialize(const detail::type_record &record) { generic_type::initialize(record, detail::type_caster::get_local_load_function_ptr()); } @@ -1565,10 +1564,9 @@ private: /// instance. Should be called as soon as the `type` value_ptr is set for an instance. Takes an /// optional pointer to an existing holder to use; if not specified and the instance is /// `.owned`, a new holder will be constructed to manage the value pointer. - template >::value, - int> = 0> + template < + typename T = type, + detail::enable_if_t::value, int> = 0> static void init_instance(detail::instance *inst, const void *holder_ptr) { auto v_h = inst->get_value_and_holder(detail::get_type_info(typeid(type))); if (!v_h.instance_registered()) { @@ -1580,7 +1578,7 @@ private: template < typename T = type, - detail::enable_if_t::is_smart_holder_type_caster::value, int> = 0> + detail::enable_if_t::value, int> = 0> static void init_instance(detail::instance *inst, const void *holder_ptr) { detail::type_caster::template init_instance_for_type(inst, holder_ptr); }