Fixing oversight: clang-format pybind11.h (affecting smart_holder code only).

This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-03-18 11:23:14 -07:00
parent 245d31cb03
commit 62a8d35831

View File

@ -1288,13 +1288,11 @@ public:
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
&& wrapped_type_uses_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_TYPE_CASTER_BASE_HOLDER(T, std::unique_ptr<T>)?"); " missing PYBIND11_TYPE_CASTER_BASE_HOLDER(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
&& wrapped_type_uses_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_TYPE_CASTER_BASE_HOLDER(T, std::shared_ptr<T>)?"); " missing PYBIND11_TYPE_CASTER_BASE_HOLDER(T, std::shared_ptr<T>)?");