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

Method is_owner

tests/test_class_sh_unique_ptr_member.cpp:28–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 explicit ptr_owner(std::unique_ptr<pointee> ptr) : ptr_(std::move(ptr)) {}
27
28 bool is_owner() const { return bool(ptr_); }
29
30 std::unique_ptr<pointee> give_up_ownership_via_unique_ptr() { return std::move(ptr_); }
31 std::shared_ptr<pointee> give_up_ownership_via_shared_ptr() { return std::move(ptr_); }

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected