diff --git a/include/pybind11/detail/smart_holder_type_casters.h b/include/pybind11/detail/smart_holder_type_casters.h index ec447ffba..28874d973 100644 --- a/include/pybind11/detail/smart_holder_type_casters.h +++ b/include/pybind11/detail/smart_holder_type_casters.h @@ -582,26 +582,6 @@ struct smart_holder_type_caster> : smart_holder_type_ca operator std::unique_ptr() { return this->loaded_as_unique_ptr(); } }; -#define PYBIND11_SMART_HOLDER_TYPE_CASTERS(T) \ - namespace pybind11 { \ - namespace detail { \ - template <> \ - class type_caster : public smart_holder_type_caster {}; \ - template <> \ - class type_caster> : public smart_holder_type_caster> { \ - }; \ - template <> \ - class type_caster> \ - : public smart_holder_type_caster> {}; \ - template <> \ - class type_caster> : public smart_holder_type_caster> { \ - }; \ - template <> \ - class type_caster> \ - : public smart_holder_type_caster> {}; \ - } \ - } - template <> struct is_smart_holder : is_smart_holder { @@ -638,5 +618,25 @@ struct is_smart_holder } }; +#define PYBIND11_SMART_HOLDER_TYPE_CASTERS(T) \ + namespace pybind11 { \ + namespace detail { \ + template <> \ + class type_caster : public smart_holder_type_caster {}; \ + template <> \ + class type_caster> : public smart_holder_type_caster> { \ + }; \ + template <> \ + class type_caster> \ + : public smart_holder_type_caster> {}; \ + template <> \ + class type_caster> : public smart_holder_type_caster> { \ + }; \ + template <> \ + class type_caster> \ + : public smart_holder_type_caster> {}; \ + } \ + } + } // namespace detail } // namespace pybind11