$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-09 11:34:30
From: "Douglas Gregor" <gregod_at_[hidden]>
>
> We now have three distinct allocation strategies with different exception
&
> performance characteristics:
>
> 1) Stack allocation. May become empty if an exception is thrown during
> assignment/swap (basic guarantee). Takes minimal stack space & will be
most
> efficient otherwise.
>
> 2) Your strategy. Strong guarantee (no ugly "empty" state). Still
> stack-allocated, but takes twice the minimum space. As efficient as (1)
>
> 3) Heap allocation. Strong guarantee, but uses heap allocation (less
> efficient than the other two because of new/delete calls).
Nothrow guarantee for swap, if I'm not mistaken.