MCPcopy Create free account
hub / github.com/pybind/pybind11 / cast

Function cast

include/pybind11/eigen/tensor.h:221–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

castMethod · 0.70

Calls 1

cast_implFunction · 0.85

Tested by

no test coverage detected