Boost logo

Boost :

From: Corrado Zoccolo (czoccolo_at_[hidden])
Date: 2007-10-22 04:20:24


On 10/21/07, Sebastian Redl <sebastian.redl_at_[hidden]> wrote:
>
> Mathias Gaunard wrote:
> > The problem with small object optimization is that you get the same
> > issue that boost.variant has: it's hard to maintain the never-empty
> > guarantee in operator=,
> Neither Boost.Any nor this optional_poly have a never-empty guarantee,
> though. Which makes = a lot easier, if you're satisfied with the Basic
> Guarantee.
> On the other hand, a poly would need a never-empty guarantee, thus
> making an optional<poly> much more complex than an optional_poly.

This is exactly the reason that made me start from optional_poly.
It is a lot simpler to implement, with just basic exception safety
guarantee.
Anyway, optional_poly has strong exception safety guarantee for swap, so I
think I could leverage it to implement poly<T> (with a larger overhead, and
losing some opportunities to perform the small object optimization).

Sebastian Redl
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
__________________________________________________________________________
dott. Corrado Zoccolo                          mailto:zoccolo_at_[hidden]
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk