
10 Mar
2006
10 Mar
'06
8:12 a.m.
Hi, When two optionals are swaped and only one is initialized, then wrapped value in the uninitialized optional is constructed and that in initialized one is destroyed. It's maybe not necessary. It should be sufficient and more effective to swap optional_base's member (m_initialized and m_storage). Is there any reason for this implementation? Regards, Vaclav