From: Fernando Cacciola (fernando.cacciola_at_[hidden])
Date: 2008-04-11 15:00:50
Adding the new requirement is out of the question, but it's definitely
possible to choose default construction or zero-initialization as
appropiate. And IMO that magic would be best placed within boost::in_place()
itself since it makes a lot of sense, given its nature, to do
zero-initialization for non-default constructible types.
With such a smart in_place factory, the optional swap implementation would
look exactly as you proposed it AFAICT.
-- Fernando Cacciola SciSoft http://fcacciola.50webs.com http://groups.google.com/group/cppba
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk