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

Method valid

tests/test_class_sh_basic.cpp:20–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18struct uconsumer { // unique_ptr consumer
19 std::unique_ptr<atyp> held;
20 bool valid() const { return static_cast<bool>(held); }
21
22 void pass_valu(std::unique_ptr<atyp> obj) { held = std::move(obj); }
23 void pass_rref(std::unique_ptr<atyp> &&obj) { held = std::move(obj); }

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected