Skip to content

Commit 5bbb8f9

Browse files
committed
Using new const_name instead of _ (related to PR #3423).
1 parent 6e44740 commit 5bbb8f9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/pybind11/detail/smart_holder_type_casters.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ struct make_constructor : private type_caster_base<int> { // Any type, nothing s
538538
template <typename T>
539539
struct smart_holder_type_caster : smart_holder_type_caster_load<T>,
540540
smart_holder_type_caster_class_hooks {
541-
static constexpr auto name = _<T>();
541+
static constexpr auto name = const_name<T>();
542542

543543
// static handle cast(T, ...)
544544
// is redundant (leads to ambiguous overloads).
@@ -703,7 +703,7 @@ struct smart_holder_type_caster : smart_holder_type_caster_load<T>,
703703
template <typename T>
704704
struct smart_holder_type_caster<std::shared_ptr<T>> : smart_holder_type_caster_load<T>,
705705
smart_holder_type_caster_class_hooks {
706-
static constexpr auto name = _<std::shared_ptr<T>>();
706+
static constexpr auto name = const_name<std::shared_ptr<T>>();
707707

708708
static handle cast(const std::shared_ptr<T> &src, return_value_policy policy, handle parent) {
709709
switch (policy) {
@@ -760,7 +760,7 @@ struct smart_holder_type_caster<std::shared_ptr<T>> : smart_holder_type_caster_l
760760
template <typename T>
761761
struct smart_holder_type_caster<std::shared_ptr<T const>> : smart_holder_type_caster_load<T>,
762762
smart_holder_type_caster_class_hooks {
763-
static constexpr auto name = _<std::shared_ptr<T const>>();
763+
static constexpr auto name = const_name<std::shared_ptr<T const>>();
764764

765765
static handle
766766
cast(const std::shared_ptr<T const> &src, return_value_policy policy, handle parent) {
@@ -780,7 +780,7 @@ struct smart_holder_type_caster<std::shared_ptr<T const>> : smart_holder_type_ca
780780
template <typename T, typename D>
781781
struct smart_holder_type_caster<std::unique_ptr<T, D>> : smart_holder_type_caster_load<T>,
782782
smart_holder_type_caster_class_hooks {
783-
static constexpr auto name = _<std::unique_ptr<T, D>>();
783+
static constexpr auto name = const_name<std::unique_ptr<T, D>>();
784784

785785
static handle cast(std::unique_ptr<T, D> &&src, return_value_policy policy, handle parent) {
786786
if (policy != return_value_policy::automatic
@@ -857,7 +857,7 @@ struct smart_holder_type_caster<std::unique_ptr<T, D>> : smart_holder_type_caste
857857
template <typename T, typename D>
858858
struct smart_holder_type_caster<std::unique_ptr<T const, D>>
859859
: smart_holder_type_caster_load<T>, smart_holder_type_caster_class_hooks {
860-
static constexpr auto name = _<std::unique_ptr<T const, D>>();
860+
static constexpr auto name = const_name<std::unique_ptr<T const, D>>();
861861

862862
static handle
863863
cast(std::unique_ptr<T const, D> &&src, return_value_policy policy, handle parent) {

0 commit comments

Comments
 (0)