2 ms·
pybind11 shares some of the motivation of boost::python, but it is designed to be considerably easier to use. Out of the box, it is aware of a large set of C++
by wjakob 9y ago
pybind11 shares some of the motivation of boost::python, but it is designed to be considerably easier to use. Out of the box, it is aware of a large set of C++ types that are automatically translated to their Python equivalents and vice versa (STL data structures, C++17 types like optional<> and variant<>, std::function<> for callbacks, and even sparse and dense matrices for numerical linear algebra).
@aldanor recently gave a nice overview talk of what pybind11 can do: https://speakerdeck.com/aldanor/pybind11-seamless-operability-between-c-plus-plus-11-and-python https://speakerdeck.com/aldanor/pybind11-seamless-operabilit...
Also, take a look at our documentation (http://pybind11.readthedocs.io http://pybind11.readthedocs.io) -- it contains detailed examples of many tricky use cases.