@@ -773,28 +773,28 @@ struct smart_holder_type_caster<std::unique_ptr<T const, D>>
773
773
774
774
#ifndef PYBIND11_USE_SMART_HOLDER_AS_DEFAULT
775
775
776
- # define PYBIND11_SMART_HOLDER_TYPE_CASTERS (T ) \
776
+ # define PYBIND11_SMART_HOLDER_TYPE_CASTERS (...) \
777
777
namespace pybind11 { \
778
778
namespace detail { \
779
779
template <> \
780
- class type_caster <T > : public smart_holder_type_caster<T > {}; \
780
+ class type_caster <__VA_ARGS__ > : public smart_holder_type_caster<__VA_ARGS__ > {}; \
781
781
template <> \
782
- class type_caster <std::shared_ptr<T>> \
783
- : public smart_holder_type_caster<std::shared_ptr<T >> {}; \
782
+ class type_caster <std::shared_ptr<__VA_ARGS__>> \
783
+ : public smart_holder_type_caster<std::shared_ptr<__VA_ARGS__ >> {}; \
784
784
template <> \
785
- class type_caster <std::shared_ptr<T const >> \
786
- : public smart_holder_type_caster<std::shared_ptr<T const >> {}; \
785
+ class type_caster <std::shared_ptr<__VA_ARGS__ const >> \
786
+ : public smart_holder_type_caster<std::shared_ptr<__VA_ARGS__ const >> {}; \
787
787
template <typename D> \
788
- class type_caster <std::unique_ptr<T , D>> \
789
- : public smart_holder_type_caster<std::unique_ptr<T , D>> {}; \
788
+ class type_caster <std::unique_ptr<__VA_ARGS__ , D>> \
789
+ : public smart_holder_type_caster<std::unique_ptr<__VA_ARGS__ , D>> {}; \
790
790
template <typename D> \
791
- class type_caster <std::unique_ptr<T const , D>> \
792
- : public smart_holder_type_caster<std::unique_ptr<T const , D>> {}; \
791
+ class type_caster <std::unique_ptr<__VA_ARGS__ const , D>> \
792
+ : public smart_holder_type_caster<std::unique_ptr<__VA_ARGS__ const , D>> {}; \
793
793
} \
794
794
}
795
795
#else
796
796
797
- # define PYBIND11_SMART_HOLDER_TYPE_CASTERS (T )
797
+ # define PYBIND11_SMART_HOLDER_TYPE_CASTERS (... )
798
798
799
799
template <typename T>
800
800
class type_caster_for_class_ : public smart_holder_type_caster <T> {};
0 commit comments