mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
return_value_policy_override fix: also enable for type_uses_smart_holder_type_caster
This commit is contained in:
parent
50a4ed2888
commit
fc5d70da29
@ -895,7 +895,9 @@ template <typename Return, typename SFINAE = void> struct return_value_policy_ov
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename Return> struct return_value_policy_override<Return,
|
template <typename Return> struct return_value_policy_override<Return,
|
||||||
detail::enable_if_t<std::is_base_of<type_caster_generic, make_caster<Return>>::value, void>> {
|
detail::enable_if_t<
|
||||||
|
std::is_base_of<type_caster_generic, make_caster<Return>>::value ||
|
||||||
|
type_uses_smart_holder_type_caster<intrinsic_t<Return>>::value, void>> {
|
||||||
static return_value_policy policy(return_value_policy p) {
|
static return_value_policy policy(return_value_policy p) {
|
||||||
return !std::is_lvalue_reference<Return>::value &&
|
return !std::is_lvalue_reference<Return>::value &&
|
||||||
!std::is_pointer<Return>::value
|
!std::is_pointer<Return>::value
|
||||||
|
Loading…
Reference in New Issue
Block a user