Add back case return_value_policy::_return_as_bytes

This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-10-18 17:04:42 -07:00
parent 50da709678
commit 18fae43b26
2 changed files with 7 additions and 0 deletions

View File

@ -360,6 +360,9 @@ private:
return eigen_ref_array<props>(*src);
case return_value_policy::reference_internal:
return eigen_ref_array<props>(*src, parent);
case return_value_policy::_return_as_bytes:
pybind11_fail("return_value_policy::_return_as_bytes does not apply.");
break;
default:
throw cast_error("unhandled return_value_policy: should not happen!");
};

View File

@ -316,6 +316,10 @@ struct type_caster<Type, typename eigen_tensor_helper<Type>::ValidType> {
writeable = !std::is_const<C>::value;
break;
case return_value_policy::_return_as_bytes:
pybind11_fail("return_value_policy::_return_as_bytes does not apply.");
break;
default:
pybind11_fail("pybind11 bug in eigen.h, please file a bug report");
}