Skip to content

Commit 6281115

Browse files
committed
[skip ci] Add a small section for py::bind_vector, py::bind_map & py::smart_holder
1 parent 350b435 commit 6281115

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/upgrade.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ you may incrementally adopt new features where appropriate:
7575
removed. Runtime failures (assuming good unit test coverage) will highlight
7676
base-and-derived class situations that require coordinated changes.
7777

78+
Note that ``py::bind_vector`` and ``py::bind_map`` (in pybind11/stl_bind.h)
79+
have a ``holder_type`` template parameter that defaults to
80+
``std::unique_ptr``. If ``py::smart_holder`` functionality is desired or
81+
required, use e.g. ``py::bind_vector<VecType, py::smart_holder>``.
82+
7883
* Gradually migrate from ``py::enum_`` to ``py::native_enum`` to improve
7984
integration with Python's standard enum types.
8085

0 commit comments

Comments
 (0)