[optional] swapping

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[optional] swapping

Vaclav Vesely

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?


Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost