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

Function no_nullptr

include/pybind11/detail/init.h:40–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38PYBIND11_NAMESPACE_BEGIN(initimpl)
39
40inline void no_nullptr(const void *ptr) {
41 if (!ptr) {
42 throw type_error("pybind11::init(): factory function returned nullptr");
43 }
44}
45
46// Implementing functions for all forms of py::init<...> and py::init(...)
47template <typename Class>

Callers 2

constructFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected