You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when I attempt to compile, I get a number of issues about certain methods not being defined (below). It appears that it is expecting methods like reserve that exist for vectors but not deque. If this is the case, then why does it work in test_stl_binders.cpp?
Could it be a version issue, or perhaps related to compiler settings?
.../pybind11/stl_bind.h:133:12: error: ‘class std::deque<myClass>’ has no member named ‘reserve’; did you mean ‘resize’?
v->reserve(len_hint(it));
~~~^~~~~~~
resize
.../pybind11/stl_bind.h:150:14: error: ‘class std::deque<myClass>’ has no member named ‘reserve’; did you mean ‘resize’?
v.reserve(old_size + len_hint(it));
~~^~~~~~~
resize
.../pybind11/stl_bind.h:220:18: error: ‘class std::deque<myClass>’ has no member named ‘reserve’; did you mean ‘resize’?
seq->reserve((size_t) slicelength);
~~~~~^~~~~~~
resize
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to bind a deque following the example here: https://github.com/pybind/pybind11/blob/master/tests/test_stl_binders.cpp#L96
However, when I attempt to compile, I get a number of issues about certain methods not being defined (below). It appears that it is expecting methods like reserve that exist for vectors but not deque. If this is the case, then why does it work in test_stl_binders.cpp?
Could it be a version issue, or perhaps related to compiler settings?
Beta Was this translation helpful? Give feedback.
All reactions