Pybind11's STL Container Auto-Conversion: Convenience vs. Copying

Pybind11 excels by automatically converting common C++ STL containers (like `std::vector` and `std::map`) to their Python equivalents (lists and dictionaries). However, this convenient template matching mechanism typically involves a copy operation, preventing true pass-by-reference semantics for these types.

Sources

Open the full topic