Implementing Move Constructor by Calling Move Assignment Operator
[…] will the compiler be able to optimize away the extra initializations? In almost all cases: yes. Should I always write my move constructors by calling the move assignment operator? Yes, just implement it via move assignment operator, except in the cases where you measured that it leads to suboptimal performance. Today’s optimizer do an … Read more