r/cpp • • Jul 04 '18

Be Mindful with Compiler-Generated Move Constructors

https://ibob.github.io/blog/2018/07/03/compiler-generated-move/
92 Upvotes

46 comments sorted by

View all comments

Show parent comment

3

u/00kyle00 Jul 04 '18

Default move-ctor wouldn't be generated for those types. The issue is that there would be no way to write a non-default move-ctor for them - affected stdlib types would have to be made non-movable.

And that would be completely arbitrary list. Im not sure whether what we have right now is better though. Im sure it was considered by the committee.