@@ -208,7 +208,7 @@ struct type_caster<T, enable_if_t<std::is_arithmetic<T>::value && !is_std_char_t
208208 return PyLong_FromUnsignedLongLong ((unsigned long long ) src);
209209 }
210210
211- PYBIND11_TYPE_CASTER (T, _ <std::is_integral<T>::value>(" int" , " float" ));
211+ PYBIND11_TYPE_CASTER (T, const_name <std::is_integral<T>::value>(" int" , " float" ));
212212};
213213
214214template <typename T> struct void_caster {
@@ -221,7 +221,7 @@ template<typename T> struct void_caster {
221221 static handle cast (T, return_value_policy /* policy */ , handle /* parent */ ) {
222222 return none ().inc_ref ();
223223 }
224- PYBIND11_TYPE_CASTER (T, _ (" None" ));
224+ PYBIND11_TYPE_CASTER (T, const_name (" None" ));
225225};
226226
227227template <> class type_caster <void_type> : public void_caster<void_type> {};
@@ -264,7 +264,7 @@ template <> class type_caster<void> : public type_caster<void_type> {
264264
265265 template <typename T> using cast_op_type = void *&;
266266 explicit operator void *&() { return value; }
267- static constexpr auto name = _ (" capsule" );
267+ static constexpr auto name = const_name (" capsule" );
268268private:
269269 void *value = nullptr ;
270270};
@@ -315,7 +315,7 @@ template <> class type_caster<bool> {
315315 static handle cast (bool src, return_value_policy /* policy */ , handle /* parent */ ) {
316316 return handle (src ? Py_True : Py_False).inc_ref ();
317317 }
318- PYBIND11_TYPE_CASTER (bool , _ (" bool" ));
318+ PYBIND11_TYPE_CASTER (bool , const_name (" bool" ));
319319};
320320
321321// Helper class for UTF-{8,16,32} C++ stl strings:
@@ -405,7 +405,7 @@ template <typename StringType, bool IsView = false> struct string_caster {
405405 return s;
406406 }
407407
408- PYBIND11_TYPE_CASTER (StringType, _ (PYBIND11_STRING_NAME));
408+ PYBIND11_TYPE_CASTER (StringType, const_name (PYBIND11_STRING_NAME));
409409
410410private:
411411 static handle decode_utfN (const char *buffer, ssize_t nbytes) {
@@ -542,7 +542,7 @@ template <typename CharT> struct type_caster<CharT, enable_if_t<is_std_char_type
542542 return one_char;
543543 }
544544
545- static constexpr auto name = _ (PYBIND11_STRING_NAME);
545+ static constexpr auto name = const_name (PYBIND11_STRING_NAME);
546546 template <typename _T> using cast_op_type = pybind11::detail::cast_op_type<_T>;
547547};
548548
@@ -579,7 +579,7 @@ template <template<typename...> class Tuple, typename... Ts> class tuple_caster
579579 return cast (*src, policy, parent);
580580 }
581581
582- static constexpr auto name = _ (" Tuple[" ) + concat(make_caster<Ts>::name...) + _ (" ]" );
582+ static constexpr auto name = const_name (" Tuple[" ) + concat(make_caster<Ts>::name...) + const_name (" ]" );
583583
584584 template <typename T> using cast_op_type = type;
585585
@@ -764,14 +764,14 @@ template <typename base, typename holder> struct is_holder_type :
764764template <typename base, typename deleter> struct is_holder_type <base, std::unique_ptr<base, deleter>> :
765765 std::true_type {};
766766
767- template <typename T> struct handle_type_name { static constexpr auto name = _ <T>(); };
768- template <> struct handle_type_name <bytes> { static constexpr auto name = _ (PYBIND11_BYTES_NAME); };
769- template <> struct handle_type_name <int_> { static constexpr auto name = _ (" int" ); };
770- template <> struct handle_type_name <iterable> { static constexpr auto name = _ (" Iterable" ); };
771- template <> struct handle_type_name <iterator> { static constexpr auto name = _ (" Iterator" ); };
772- template <> struct handle_type_name <none> { static constexpr auto name = _ (" None" ); };
773- template <> struct handle_type_name <args> { static constexpr auto name = _ (" *args" ); };
774- template <> struct handle_type_name <kwargs> { static constexpr auto name = _ (" **kwargs" ); };
767+ template <typename T> struct handle_type_name { static constexpr auto name = const_name <T>(); };
768+ template <> struct handle_type_name <bytes> { static constexpr auto name = const_name (PYBIND11_BYTES_NAME); };
769+ template <> struct handle_type_name <int_> { static constexpr auto name = const_name (" int" ); };
770+ template <> struct handle_type_name <iterable> { static constexpr auto name = const_name (" Iterable" ); };
771+ template <> struct handle_type_name <iterator> { static constexpr auto name = const_name (" Iterator" ); };
772+ template <> struct handle_type_name <none> { static constexpr auto name = const_name (" None" ); };
773+ template <> struct handle_type_name <args> { static constexpr auto name = const_name (" *args" ); };
774+ template <> struct handle_type_name <kwargs> { static constexpr auto name = const_name (" **kwargs" ); };
775775
776776template <typename type>
777777struct pyobject_caster {
0 commit comments