|
Boost : |
Subject: Re: [boost] several messages
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2012-08-09 06:24:48
> > 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk