-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing data in std::vector<double> #75
Comments
Sounds like it's not implemented properly. |
Well, it does seem that you can index into the DoubleVector using |
OK, it's probably a reference counting thing. It needs to keep a reference to the original |
How fixable is this? At the moment I have a non-swig-based MATLAB wrapper working, so it's not the end of the world, but it is quite annoying that I can can't have vectors in returned structs. |
It's probably fixable with a moderate effort. But someone has to do it. |
In my C++ code, I sometimes return std::vector. That end up getting wrapped in a DoubleVector from the swig typemap, but for the life of me, I can't figure out how to get access to the data being wrapped. I tried to pop(), but that only works once, and the second call crashes MATLAB. The at() function isn't wrapped, and neither is any other type of accessor. So, how do I get my data back out of a DoubleVector?
The text was updated successfully, but these errors were encountered: