
20 Nov
2011
20 Nov
'11
8 a.m.
On Saturday, November 19, 2011 11:22:25 Sebastian Redl wrote:
On 19.11.2011, at 00:16, Andrzej Krzemienski wrote:
3. T is neither copyable nor moveable -- it is like a scope guard, or boost::scoped_ptr. In this case optional<T> still provides assignment by making a "pseudo destructor call" followed by a call to placement new.
Do we even want the third variant? That is, do we want to support tr2::optional of something that is neither copyable nor movable? My gut instinct says no, that's unintuitive.
Why not? I've had such use cases and I don't see why that would be wrong.