Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-09 12:21:22

--- David Abrahams <dave_at_[hidden]> wrote:
> > Stop kidding yourself, variant_copy is much more predicable
> > than new T() that variant is using to provide basic guarantess.
> > Theretically, if a copy constructor crashes the memory
> > heap could already be corrupted.
> > The stack solution is much more safer in this respect
> > and it provides strong guarantess.
> Sorry...

Sorry, what? In practice new T() is much more undefined
than variant_copy().

> > [...]
> >
> >> No, you can't.
> >
> > Yes, you can.
> No, you can't.
> I am really losing patience with this silliness. Are you so certain
> you're right that you'r unwilling to even look in the standard or the
> mail archives when you're told that this ground has already been
> covered?
> Should be easy enough for you, now. Please stop wasting everyone's
> time, especially mine.

Look again at the standard.

"A program may end the lifetime of any object by reusing the storage
which the object occupies"

It doesn't define the process of how exactly the storage gets
reused, does it? "reusing storage" what does it mean?

When you do an assignment in variant it is the process
of reusing the storage that is not defined in the standard.

FYI I don't really care about your comments other than technical.
You can relax a bit.


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Boost list run by bdawes at, gregod at, cpdaniel at, john at