diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index e41ad2abf..0f3091f68 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -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(); - return true; + return; } throw cast_error("Unable to cast from non-held to held instance (T& to Holder) " #if !defined(PYBIND11_DETAILED_ERROR_MESSAGES)