Renaming type_caster_type_is_smart_holder_type_caster ->…

Renaming type_caster_type_is_smart_holder_type_caster -> wrapped_type_uses_smart_holder_type_caster for clarity.
parent 3a303ee2
...@@ -1314,19 +1314,19 @@ public: ...@@ -1314,19 +1314,19 @@ public:
// clang-format on // clang-format on
static constexpr bool holder_is_smart_holder static constexpr bool holder_is_smart_holder
= detail::is_smart_holder_type<holder_type>::value; = detail::is_smart_holder_type<holder_type>::value;
static constexpr bool type_caster_type_is_smart_holder_type_caster static constexpr bool wrapped_type_uses_smart_holder_type_caster
= detail::type_uses_smart_holder_type_caster<type>::value; = detail::type_uses_smart_holder_type_caster<type>::value;
static constexpr bool type_caster_type_is_type_caster_base_subtype static constexpr bool type_caster_type_is_type_caster_base_subtype
= std::is_base_of<detail::type_caster_base<type>, detail::type_caster<type>>::value; = std::is_base_of<detail::type_caster_base<type>, detail::type_caster<type>>::value;
// Necessary conditions, but not strict. // Necessary conditions, but not strict.
static_assert( static_assert(
!(detail::is_instantiation<std::unique_ptr, holder_type>::value !(detail::is_instantiation<std::unique_ptr, holder_type>::value
&& type_caster_type_is_smart_holder_type_caster), && wrapped_type_uses_smart_holder_type_caster),
"py::class_ holder vs type_caster mismatch:" "py::class_ holder vs type_caster mismatch:"
" missing PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS(T, std::unique_ptr<T>)?"); " missing PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS(T, std::unique_ptr<T>)?");
static_assert( static_assert(
!(detail::is_instantiation<std::shared_ptr, holder_type>::value !(detail::is_instantiation<std::shared_ptr, holder_type>::value
&& type_caster_type_is_smart_holder_type_caster), && wrapped_type_uses_smart_holder_type_caster),
"py::class_ holder vs type_caster mismatch:" "py::class_ holder vs type_caster mismatch:"
" missing PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS(T, std::shared_ptr<T>)?"); " missing PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS(T, std::shared_ptr<T>)?");
static_assert(!(holder_is_smart_holder && type_caster_type_is_type_caster_base_subtype), static_assert(!(holder_is_smart_holder && type_caster_type_is_type_caster_base_subtype),
...@@ -1334,7 +1334,7 @@ public: ...@@ -1334,7 +1334,7 @@ public:
" missing PYBIND11_SMART_HOLDER_TYPE_CASTERS(T)?"); " missing PYBIND11_SMART_HOLDER_TYPE_CASTERS(T)?");
#ifdef PYBIND11_STRICT_ASSERTS_CLASS_HOLDER_VS_TYPE_CASTER_MIX #ifdef PYBIND11_STRICT_ASSERTS_CLASS_HOLDER_VS_TYPE_CASTER_MIX
// Strict conditions cannot be enforced universally at the moment (PR #2836). // Strict conditions cannot be enforced universally at the moment (PR #2836).
static_assert(holder_is_smart_holder == type_caster_type_is_smart_holder_type_caster, static_assert(holder_is_smart_holder == wrapped_type_uses_smart_holder_type_caster,
"py::class_ holder vs type_caster mismatch:" "py::class_ holder vs type_caster mismatch:"
" missing PYBIND11_SMART_HOLDER_TYPE_CASTERS(T)" " missing PYBIND11_SMART_HOLDER_TYPE_CASTERS(T)"
" or collision with custom py::detail::type_caster<T>?"); " or collision with custom py::detail::type_caster<T>?");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment