I am starting to use Pybind11. I am planning to use Pybind11 in a complex project for exposing c++ structures to python, will be helpful to see an example showing how to expose populate from python an array using the following structures:
template <typename T>
struct point;
template <typename T>
struct quaternion;
template <typename T>
struct point{
T _x, _y, _z;
};
template <typename T>
struct quaternion{
T _a, _b_i, _c_j, _d_k;
};
It is a good idea to use std::shared_ptr pointers. How to use std::smart_ptr with pybind11? In more concrete terms, I want to be able of populating the array from python and once the population is complete, I want to be capable of passing a range of pointers(std::smart_ptr) pointing to a region of the array from python to a routine in C++ to do something else with the data. It could be passing a pointer to the beginning and another the end of a chunk of data in the array scan the data using pointer arithmetics.
Disclaimer: I don't know if Pybin11 might be using std::shared_ptr under the hood by default.
std::smart_ptr? Do you mean smart pointers in general?