+ 1
What is move constructor?
what is move constructor, and what is use of that?
1 Réponse
+ 12
If a class doesn't have any user-declared special member functions (save a default constructor), C++ declares its remaining five (or six) special member functions implicitly, including a move constructor and amove assignment operator.
http://en.cppreference.com/w/cpp/language/move_constructor
Use:-
A trivial move constructor is a constructor that performs the same action as the trivialcopy constructor, that is, makes a copy of the object representation as if by std::memmove. All data types compatible with the C language (POD types) are trivially movable