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

Function object_or_cast

include/pybind11/cast.h:1828–1830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1826// Declared in pytypes.h:
1827template <typename T, enable_if_t<!is_pyobject<T>::value, int>>
1828object object_or_cast(T &&o) {
1829 return pybind11::cast(std::forward<T>(o));
1830}
1831
1832// Declared in pytypes.h:
1833// Implemented here so that make_caster<T> can be used.

Callers

nothing calls this directly

Calls 1

castFunction · 0.70

Tested by

no test coverage detected