MCPcopy Create free account
hub / github.com/pybind/pybind11 / operator&

Method operator&

tests/test_smart_ptr.cpp:54–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 explicit shared_ptr_with_addressof_operator(T *p) : impl(p) {}
53 T *get() const { return impl.get(); }
54 T **operator&() { throw std::logic_error("Call of overloaded operator& is not expected"); }
55};
56
57// Simple custom holder that works like unique_ptr and has operator& overload

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected