[optional] swapping initialized with uninitialized

10 Mar
2006
10 Mar
'06
2:31 p.m.
Hi, When two optionals (one initialized and other not) are swaped, then the one value in uninitialized optional is constructed and the other one in initialized optional is destructed. IMHO it's not necessary. It should be more effective to swap optional's m_storages without any values constructiona and destruction. Is there any reason for the current implementation? Regards, Vaclav
7038
Age (days ago)
7038
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vaclav Vesely