mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 00:22:00 +00:00
Fix a minor and inconsequential inconsistency in copyable_holder_caster
: the correct load_value()
return type is void
(as defined in type_caster_generic
)
For easy future reference, this is the long-standing inconsistency: *dbf848aff7/include/pybind11/detail/type_caster_base.h (L634)
*dbf848aff7/include/pybind11/cast.h (L797)
Noticed in passing while working on PR #5213.
This commit is contained in:
parent
5e30064ee6
commit
54fd559117
@ -794,11 +794,11 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
bool load_value(value_and_holder &&v_h) {
|
||||
void load_value(value_and_holder &&v_h) {
|
||||
if (v_h.holder_constructed()) {
|
||||
value = v_h.value_ptr();
|
||||
holder = v_h.template holder<holder_type>();
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
throw cast_error("Unable to cast from non-held to held instance (T& to Holder<T>) "
|
||||
#if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)
|
||||
|
Loading…
Reference in New Issue
Block a user