Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-11-06 06:13:20

On Tue, 5 Nov 2002 18:22:22 -0300, "Fernando Cacciola"
<fernando_cacciola_at_[hidden]> wrote:

>I also think it is useful for the case when you have more than one object
>and you don't know how to perform a (no throw) move/swap of those objects.
>That is, if you have:
>How do you implement no-throw swapping without a transacted approach (so
>that you can rollback state in case of an exception)?
>The double buffer would allow you to have no-throw swap in the array even if
>you don't have it in the objects themselves.

Well, I'm not sure what you are trying to say. BTW I couldn't find the
details of construct_as. Are you saying that it doesn't use the copy
constructor? Otherwise I don't see how the tecnique achieves a
*no-throw* swap: either the copy constructor is nothrow itself and
thus the tecnique is not needed, or it throws and the tecnique only
gives you the strong guarantee. Or am I missing something?


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