Boost logo

Boost :

From: Fernando Cacciola (fernando.cacciola_at_[hidden])
Date: 2008-04-11 15:00:50

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!


Fernando Cacciola

Boost list run by bdawes at, gregod at, cpdaniel at, john at