@@ -230,7 +230,7 @@ struct type_caster<T, enable_if_t<std::is_arithmetic<T>::value && !is_std_char_t
230
230
return PyLong_FromUnsignedLongLong ((unsigned long long ) src);
231
231
}
232
232
233
- PYBIND11_TYPE_CASTER (T, _ <std::is_integral<T>::value>(" int" , " float" ));
233
+ PYBIND11_TYPE_CASTER (T, const_name <std::is_integral<T>::value>(" int" , " float" ));
234
234
};
235
235
236
236
template <typename T> struct void_caster {
@@ -243,7 +243,7 @@ template<typename T> struct void_caster {
243
243
static handle cast (T, return_value_policy /* policy */ , handle /* parent */ ) {
244
244
return none ().inc_ref ();
245
245
}
246
- PYBIND11_TYPE_CASTER (T, _ (" None" ));
246
+ PYBIND11_TYPE_CASTER (T, const_name (" None" ));
247
247
};
248
248
249
249
template <> class type_caster <void_type> : public void_caster<void_type> {};
@@ -286,7 +286,7 @@ template <> class type_caster<void> : public type_caster<void_type> {
286
286
287
287
template <typename T> using cast_op_type = void *&;
288
288
explicit operator void *&() { return value; }
289
- static constexpr auto name = _ (" capsule" );
289
+ static constexpr auto name = const_name (" capsule" );
290
290
private:
291
291
void *value = nullptr ;
292
292
};
@@ -337,7 +337,7 @@ template <> class type_caster<bool> {
337
337
static handle cast (bool src, return_value_policy /* policy */ , handle /* parent */ ) {
338
338
return handle (src ? Py_True : Py_False).inc_ref ();
339
339
}
340
- PYBIND11_TYPE_CASTER (bool , _ (" bool" ));
340
+ PYBIND11_TYPE_CASTER (bool , const_name (" bool" ));
341
341
};
342
342
343
343
// Helper class for UTF-{8,16,32} C++ stl strings:
@@ -427,7 +427,7 @@ template <typename StringType, bool IsView = false> struct string_caster {
427
427
return s;
428
428
}
429
429
430
- PYBIND11_TYPE_CASTER (StringType, _ (PYBIND11_STRING_NAME));
430
+ PYBIND11_TYPE_CASTER (StringType, const_name (PYBIND11_STRING_NAME));
431
431
432
432
private:
433
433
static handle decode_utfN (const char *buffer, ssize_t nbytes) {
@@ -564,7 +564,7 @@ template <typename CharT> struct type_caster<CharT, enable_if_t<is_std_char_type
564
564
return one_char;
565
565
}
566
566
567
- static constexpr auto name = _ (PYBIND11_STRING_NAME);
567
+ static constexpr auto name = const_name (PYBIND11_STRING_NAME);
568
568
template <typename _T> using cast_op_type = pybind11::detail::cast_op_type<_T>;
569
569
};
570
570
@@ -601,7 +601,7 @@ template <template<typename...> class Tuple, typename... Ts> class tuple_caster
601
601
return cast (*src, policy, parent);
602
602
}
603
603
604
- static constexpr auto name = _ (" Tuple[" ) + concat(make_caster<Ts>::name...) + _ (" ]" );
604
+ static constexpr auto name = const_name (" Tuple[" ) + concat(make_caster<Ts>::name...) + const_name (" ]" );
605
605
606
606
template <typename T> using cast_op_type = type;
607
607
@@ -790,14 +790,14 @@ template <typename base, typename holder> struct is_holder_type :
790
790
template <typename base, typename deleter> struct is_holder_type <base, std::unique_ptr<base, deleter>> :
791
791
std::true_type {};
792
792
793
- template <typename T> struct handle_type_name { static constexpr auto name = _ <T>(); };
794
- template <> struct handle_type_name <bytes> { static constexpr auto name = _ (PYBIND11_BYTES_NAME); };
795
- template <> struct handle_type_name <int_> { static constexpr auto name = _ (" int" ); };
796
- template <> struct handle_type_name <iterable> { static constexpr auto name = _ (" Iterable" ); };
797
- template <> struct handle_type_name <iterator> { static constexpr auto name = _ (" Iterator" ); };
798
- template <> struct handle_type_name <none> { static constexpr auto name = _ (" None" ); };
799
- template <> struct handle_type_name <args> { static constexpr auto name = _ (" *args" ); };
800
- template <> struct handle_type_name <kwargs> { static constexpr auto name = _ (" **kwargs" ); };
793
+ template <typename T> struct handle_type_name { static constexpr auto name = const_name <T>(); };
794
+ template <> struct handle_type_name <bytes> { static constexpr auto name = const_name (PYBIND11_BYTES_NAME); };
795
+ template <> struct handle_type_name <int_> { static constexpr auto name = const_name (" int" ); };
796
+ template <> struct handle_type_name <iterable> { static constexpr auto name = const_name (" Iterable" ); };
797
+ template <> struct handle_type_name <iterator> { static constexpr auto name = const_name (" Iterator" ); };
798
+ template <> struct handle_type_name <none> { static constexpr auto name = const_name (" None" ); };
799
+ template <> struct handle_type_name <args> { static constexpr auto name = const_name (" *args" ); };
800
+ template <> struct handle_type_name <kwargs> { static constexpr auto name = const_name (" **kwargs" ); };
801
801
802
802
template <typename type>
803
803
struct pyobject_caster {
0 commit comments