Repository navigation
Replies: 1 comment
|
The documented custom-holder mechanism is separate from If you want to keep your pointer as the holder, the supported pattern is: // At global scope, after declaring MySharedPtr and before the bindings:
PYBIND11_DECLARE_HOLDER_TYPE(T, MySharedPtr<T>);
// Inside the module bindings:
py::class_<Widget, MySharedPtr<Widget>>(m, "Widget");This uses I would leave the macro's optional third argument at its default unless your ownership rules satisfy the documented condition for What special behavior does your pointer add, and which |
Uh oh!
There was an error while loading. Please reload this page.
Hi, we have a custom
shared_ptrthat pretty much mimics the API of astd::shared_ptrbut is special in other waysIs there a way to used the
smart_holderwith a customshared smart pointertype?All reactions