
2013/1/25 Gottlob Frege <gottlobfrege@gmail.com>
On Fri, Jan 25, 2013 at 4:25 PM, Krzysztof Czainski <1czajnik@gmail.com
wrote: So to me the question is: should move introduce an "uninitialized" state for types that don't have one in the first place. Int has an uninitialized state. Iterators in std algorithms are allowed to have such a state too. And now we have moved-from objects - should they be allowed an additional "uninitialized" state? I answer yes, because moved-from objects must not be used for anything other than destruction or assignment-to.
But I don't think this is the question - or it was, but no longer is - because I think the standard already asked and answered the question (and it was hotly debated, but answered) - the answer was that moved from objects should be in valid but unknown states. ie not UB. not uninitialized.
Oh, thanks for clarifying this. I thought the standard said, that moved from objects should be in a state valid only for destruction/assignment to. If I was wrong, and it says the moved from objects must also be usable in other ways (i.e. readable), then you just convinced me here ;-) And in this case, I am against adding an empty state to variant recursive wrapper. We might wish it different, but it isn't.
Cheers Kris