Adding move constructors and move assignment operators #180
Unanswered
HermanPijl
asked this question in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My son had to use the ublas library to implement solvers for differential equations. The lecturer of the course was promoting some horrible techniques to avoid the copying of vector and matrix objects. When I look at the vector and matrix templates, then I am very surprised that these templates define neither move constructors, nor move assignment operators. I think that most (if not all) templates or classes/structs that use heap allocated memory should have move semantics in constructors and assignment operators. Standard C++ has them since the C++11 standard. Not adding them, is making ublas more and more an outdated template library. Boost was meant to run in front of the new standard, but for this aspect it is running more than a decade behind. So my concrete proposal is to add move semantics to all templates that manage heap allocated memory.
Beta Was this translation helpful? Give feedback.
All reactions