
11 Apr
2008
11 Apr
'08
7 p.m.
Hi Thorsten, 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. Good job! Best -- Fernando Cacciola SciSoft http://fcacciola.50webs.com http://groups.google.com/group/cppba