
9 Aug
2012
9 Aug
'12
10:24 a.m.
OK I'll have to rethink, and make sure everything other than arithmetic is supported for moved-from types.
Actually, in principle, a moved-from object should be a valid object, which just has an unspecified value.
IMHO any code that reads such unspecified values is buggy. I wonder if the compiler could produce warnings for reading an unspecified value. It seems like a bad idea 99.9% of the time. It'd be cool if Valgrind could be given a hint to mark such data as non-inited. If I had a movable class with a double I'd set it's value signaling NAN at least for a debug build. Chris