
29 Jul
2008
29 Jul
'08
7:13 p.m.
on Tue Jul 29 2008, Steven Watanabe <watanabesj-AT-gmail.com> wrote:
It's the same with regular empty objects: you have to make sure you do not access them.
No it isn't the same. There are some operations that ought to be valid for any object, regardless of whether it is empty or not. In particular if an type supports assignment, it should /always/ be safe to assign a new value to to an object of that type.
Technically, in general, anything moved-from only needs to be in a destructible (and not assignable) state. However, a library can impose whatever additional requirements it wants to, and that the object needs to be assignable is certainly a reasonable (and useful) one. -- Dave Abrahams BoostPro Computing http://www.boostpro.com