| 219 | } |
| 220 | |
| 221 | static handle cast(Type &&src, return_value_policy policy, handle parent) { |
| 222 | if (policy == return_value_policy::reference |
| 223 | || policy == return_value_policy::reference_internal) { |
| 224 | pybind11_fail("Cannot use a reference return value policy for an rvalue"); |
| 225 | } |
| 226 | return cast_impl(&src, return_value_policy::move, parent); |
| 227 | } |
| 228 | |
| 229 | static handle cast(const Type &&src, return_value_policy policy, handle parent) { |
| 230 | if (policy == return_value_policy::reference |