Lines Matching refs:type_caster

38 /// A life support system for temporary objects created by `type_caster::load()`.
911 template <typename type, typename SFINAE = void> class type_caster : public type_caster_base<type> { };
912 template <typename type> using make_caster = type_caster<intrinsic_t<type>>;
914 // Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T
924 template <typename type> class type_caster<std::reference_wrapper<type>> {
972 struct type_caster<T, enable_if_t<std::is_arithmetic<T>::value && !is_std_char_type<T>::value>> {
1073 template <> class type_caster<void_type> : public void_caster<void_type> {};
1075 template <> class type_caster<void> : public type_caster<void_type> {
1077 using type_caster<void_type>::cast;
1118 template <> class type_caster<std::nullptr_t> : public void_caster<std::nullptr_t> { };
1120 template <> class type_caster<bool> {
1264 struct type_caster<std::basic_string<CharT, Traits, Allocator>, enable_if_t<is_std_char_type<CharT>::value>>
1269 struct type_caster<std::basic_string_view<CharT, Traits>, enable_if_t<is_std_char_type<CharT>::value>>
1275 template <typename CharT> struct type_caster<CharT, enable_if_t<is_std_char_type<CharT>::value>> {
1277 using StringCaster = type_caster<StringType>;
1423 template <typename T1, typename T2> class type_caster<std::pair<T1, T2>>
1426 template <typename... Ts> class type_caster<std::tuple<Ts...>>
1441 static_assert(std::is_base_of<base, type_caster<type>>::value,
1515 class type_caster<std::shared_ptr<T>> : public copyable_holder_caster<T, std::shared_ptr<T>> { };
1519 static_assert(std::is_base_of<type_caster_base<type>, type_caster<type>>::value,
1530 class type_caster<std::unique_ptr<type, deleter>>
1546 class type_caster<holder_type, enable_if_t<!is_shared_ptr<holder_type>::value>> \
1552 std::is_base_of<detail::type_caster_holder<base, holder>, detail::type_caster<holder>> {};
1582 class type_caster<T, enable_if_t<is_pyobject<T>::value>> : public pyobject_caster<T> { };
1587 // - type_caster<T>::operator T&() must exist
1612 // Detect whether returning a `type` from a cast on type's type_caster is going to result in a
1613 // reference or pointer to a local variable of the type_caster. Basically, only
1639 template <typename T, typename SFINAE> type_caster<T, SFINAE> &load_type(type_caster<T, SFINAE> &conv, const handle &handle) {
1650 // Wrapper around the above that also constructs and returns a type_caster
2125 template<> class type_caster<__VA_ARGS__> : public type_caster_base<__VA_ARGS__> { }; \