
At Wed, 09 Feb 2011 06:44:42 -0800, Steven Watanabe wrote:
AMDG
On 2/8/2011 11:54 PM, Adarsh Soodan wrote:
On Wed, Feb 9, 2011 at 1:07 PM, Nevin Liber
wrote: What are your exception safety guarantees compared with the current implementation of boost::any?
I do not see the exception safety gurantees required of the held value object changing from the original any.hpp.
What about swap? swap is no-throw now.
Just to be a little less opaque about this, everyone is asking because what you did is very similar to what's done in boost::variant, which led to some very interesting problems described in http://www.boost.org/doc/libs/1_45_0/doc/html/variant/design.html#variant.de... with very non-obvious solutions. So you might also consider what happens under assignment when the constructor of the new object throws. -- Dave Abrahams BoostPro Computing http://www.boostpro.com