|
Boost : |
From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-09 21:46:49
--- Douglas Gregor <gregod_at_[hidden]> wrote:
> At the line
>
> T* obj = new (data_) T;
>
> you've ended the lifetime of the object that used to be in data_.
So that is the definition of "reusing storage" in the standard.
How about T* obj = new( (char*)data_+3 ) T ? Is it still ending
the object's lifetime? There is not such definition in the standard.
The standard is lacking a consistent definition of "storage"
and storage usage concepts.
I am free to argue:
variant<char, int> x;
//# starting reusing storage
x = 1; //standard is undefined
//# stoped reusing storage
If the "reusing storage" concept is undefined, the object liftime is undefined.
Eugene
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk