diff --git a/include/pybind11/detail/smart_holder_type_casters.h b/include/pybind11/detail/smart_holder_type_casters.h index 98e322cdc..b6f26b966 100644 --- a/include/pybind11/detail/smart_holder_type_casters.h +++ b/include/pybind11/detail/smart_holder_type_casters.h @@ -538,7 +538,7 @@ struct make_constructor : private type_caster_base { // Any type, nothing s template struct smart_holder_type_caster : smart_holder_type_caster_load, smart_holder_type_caster_class_hooks { - static constexpr auto name = _(); + static constexpr auto name = const_name(); // static handle cast(T, ...) // is redundant (leads to ambiguous overloads). @@ -703,7 +703,7 @@ struct smart_holder_type_caster : smart_holder_type_caster_load, template struct smart_holder_type_caster> : smart_holder_type_caster_load, smart_holder_type_caster_class_hooks { - static constexpr auto name = _>(); + static constexpr auto name = const_name>(); static handle cast(const std::shared_ptr &src, return_value_policy policy, handle parent) { switch (policy) { @@ -760,7 +760,7 @@ struct smart_holder_type_caster> : smart_holder_type_caster_l template struct smart_holder_type_caster> : smart_holder_type_caster_load, smart_holder_type_caster_class_hooks { - static constexpr auto name = _>(); + static constexpr auto name = const_name>(); static handle cast(const std::shared_ptr &src, return_value_policy policy, handle parent) { @@ -780,7 +780,7 @@ struct smart_holder_type_caster> : smart_holder_type_ca template struct smart_holder_type_caster> : smart_holder_type_caster_load, smart_holder_type_caster_class_hooks { - static constexpr auto name = _>(); + static constexpr auto name = const_name>(); static handle cast(std::unique_ptr &&src, return_value_policy policy, handle parent) { if (policy != return_value_policy::automatic @@ -857,7 +857,7 @@ struct smart_holder_type_caster> : smart_holder_type_caste template struct smart_holder_type_caster> : smart_holder_type_caster_load, smart_holder_type_caster_class_hooks { - static constexpr auto name = _>(); + static constexpr auto name = const_name>(); static handle cast(std::unique_ptr &&src, return_value_policy policy, handle parent) {