[Bug libstdc++/42832] Revisit std::function for aliasing issues

paolo dot carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Mon Jan 25 10:10:00 GMT 2010



------- Comment #5 from paolo dot carlini at oracle dot com  2010-01-25 10:10 -------
Ok, I see that asking was a good idea, the tangle of issues is quite complex.
Anyway, this is my current proposal: let' use for now your mildly optimized and
in any case correct solution using a loop of char-wise std::swap, the first
solution you proposed on the gcc-patches discussion. For both std and tr1.
Likely tr1 will stay like that forever. Let's remove the dependency of this bug
on the overzealous memcpy optimization bug and the blocking of the optimization
issue which started this discussion; let's add instead dependency on the
"uninitialized_swap" enhancement. Let's keep the present bug open of course, as
enhancement.

Are you willing to prepare a patch including a comment, better two different
comments one simpler for the tr1 version and one slightly longer for the std
version? 


-- 


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



More information about the Gcc-bugs mailing list