Issue
In boost::python
, to wrap a vector<T>
you would do something like this:
boost::python::class_< std::vector < T > >("T")
.def(boost::python::vector_indexing_suite<std::vector< T > >());
How do I accomplish the same thing in nanobind?
Solution
Include the header <nanobind/stl/bind_vector.h>
and then its just:
nb::bind_vector<std::vector<T> >(m, "T");
Answered By - got here
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.