Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-08 14:15:41

"E. Gladyshev" <egladysh_at_[hidden]> writes:

> --- Daniel Wallin <dalwan01_at_[hidden]> wrote:
> [...]
>> I don't yet buy that this is a problem for generic programming;
>> If variant is part of the program interface, the type shouldn't be changed
>> anyway, so "wanting the benefit of the optimization" becomes the users
>> problem.
>> If the variant is part of the implementation, where the type sequence
>> is part of the interface, the invariant type is just an implementation
>> detail, or part of the program documentation.
> typedef variant< int, my_type > v1;
> typedef variant< my_type, int > v2;
> I think that we should just realize that
> in the current variant, v1 and v2 have
> a vastly different behaviour.

Really? What are the differences?

> It just goes against any conventional
> wisdom and intuition. People, please...
> I don't think that the *weak* exception
> safety (the way it is implement now)

What is "weak" exception safety?

> is worth it.

IIUC the exception guarantees are the same whether or not the
optimization takes effect.

Dave Abrahams
Boost Consulting

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