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

Function cast_safe

include/pybind11/cast.h:1883–1888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1881// that only does anything in cases where pybind11::cast is valid.
1882template <typename T>
1883enable_if_t<cast_is_temporary_value_reference<T>::value
1884 && !detail::is_same_ignoring_cvref<T, PyObject *>::value,
1885 T>
1886cast_safe(object &&) {
1887 pybind11_fail("Internal error: cast_safe fallback invoked");
1888}
1889template <typename T>
1890enable_if_t<std::is_void<T>::value, void> cast_safe(object &&) {}
1891template <typename T>

Callers

nothing calls this directly

Calls 3

moveFunction · 0.85
ptrMethod · 0.80
releaseMethod · 0.80

Tested by

no test coverage detected