This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/42832] Revisit std::function for aliasing issues
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2010 10:10:16 -0000
- Subject: [Bug libstdc++/42832] Revisit std::function for aliasing issues
- References: <bug-42832-16141@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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