
Louis Dionne wrote:
My vote goes to II.
- Using moved-from objects should rarely happen, if ever. - It is not even a breaking change since move from variants was not supported in the past.
That's not quite true. If a type doesn't have a move constructor, move is supported and same as copy.
Moreover, I am explicitly against proposition III:
- The state of the moved-from variant is not explicitly set by the programmer. I tend to prefer explicit to implicit. - The type held in the moved-from variant depends on the types in the variant, which could make it harder to use variants in generic code.
I fail to grasp the logic that simultaneously holds that
- Using moved-from objects should rarely happen, if ever.
and then proceeds to argue that moved-from objects should not be left in such-and-such valid state, but must be left in an invalid state instead.