
Oh no - what you have is just perfect - assuming that resize creates new entries and doesn't just increase some internal indicator. A copy would create the problem of loading to a temporary object that is then copied from which would invalidate its address. Neal Becker wrote:
Robert Ramey wrote:
I wonder about this - but I know nothing of ublas. If v.resize actually creates the entries I guess it would be just fine. Now I wonder about my own implementation of serialization for std::vector. It seems yours here is more efficient.
I wondered whether I should use std::copy instead - maybe this would provide more opportunity for optimization?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost