
11 Apr
2008
11 Apr
'08
8:20 p.m.
Fernando Cacciola wrote:
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.
Please explain! Doesn't a call to boost::in_place(), having zero arguments, require T to be DefaultConstructible? Kind regards, Niels