http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46821

--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2010-12-06 
13:50:45 UTC ---
Calling swap exactly like in the non-empty case? It seems expected to me that
swap be called for each element, and in the usual empty case the compiler
should still be able to optimize it to a no-op I guess.

But really I am not sure here. I just had a look, boost also does nothing in
compressed_pair. libcxx on the other hand does call swap, but that may not be a
conscious decision.

Reply via email to