Skip to content

Commit

Permalink
Systematically use is_base_of<type_caster_generic, make_caster<D>>
Browse files Browse the repository at this point in the history
…in `property_cpp_function<>` specializations.
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Jul 14, 2024
1 parent 3406be6 commit c65d5df
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -1635,8 +1635,8 @@ struct property_cpp_function<
T,
D,
detail::enable_if_t<
detail::all_of<std::is_base_of<detail::type_caster_base<T>, detail::type_caster<T>>,
std::is_base_of<detail::type_caster_base<D>, detail::make_caster<D>>,
detail::all_of<std::is_base_of<detail::type_caster_generic, detail::type_caster<T>>,
std::is_base_of<detail::type_caster_generic, detail::make_caster<D>>,
std::is_pointer<D>>::value>> {

using drp = typename std::remove_pointer<D>::type;
Expand Down Expand Up @@ -1683,8 +1683,8 @@ struct property_cpp_function<
T,
D,
detail::enable_if_t<
detail::all_of<std::is_base_of<detail::type_caster_base<T>, detail::type_caster<T>>,
std::is_base_of<detail::type_caster_base<D>, detail::type_caster<D>>,
detail::all_of<std::is_base_of<detail::type_caster_generic, detail::type_caster<T>>,
std::is_base_of<detail::type_caster_generic, detail::make_caster<D>>,
detail::none_of<std::is_pointer<D>,
std::is_array<D>,
detail::is_instantiation<std::unique_ptr, D>,
Expand Down Expand Up @@ -1743,10 +1743,10 @@ struct property_cpp_function<
T,
D,
detail::enable_if_t<
detail::all_of<std::is_base_of<detail::type_caster_base<T>, detail::type_caster<T>>,
detail::all_of<std::is_base_of<detail::type_caster_generic, detail::type_caster<T>>,
detail::is_instantiation<std::unique_ptr, D>,
std::is_base_of<detail::type_caster_base<typename D::element_type>,
detail::type_caster<typename D::element_type>>>::value>> {
std::is_base_of<detail::type_caster_generic,
detail::make_caster<typename D::element_type>>>::value>> {

template <typename PM, must_be_member_function_pointer<PM> = 0>
static cpp_function readonly(PM, const handle &) {
Expand Down

0 comments on commit c65d5df

Please sign in to comment.