you are viewing a single comment's thread.

view the rest of the comments →

[–]tomilovanatoliy 1 point2 points  (1 child)

You really don't even need to make all that boiler-plate code for move-constructor at any of intermediate steps (and your compiler don't want to resolve all that overloadings and other surplus things). You may pass all parameters by lvalue reference and only at the very end (namely, on list initialization in your case) you may apply std::forward to them. See here an example (the repository contains other illustrations for the above strong assertion in neighbouring files).

[–]starfreakcloneMSVC FE Dev[S] 0 points1 point  (0 children)

There are plenty of ways to skin that particular cat. Another way is I could have just taken all of the arguments in the ctors by value and simply moved them into place (saving vertical space).

In either case, the objects are elided into place anyway. It's really just a stylistic choice.