
21 Oct
2007
21 Oct
'07
9:48 p.m.
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,
Mathias Gaunard wrote: 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. Sebastian Redl