http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49107
--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-04 23:35:38 UTC --- Created attachment 24433 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24433 Patch to generalize the copy hack in the compiler Here's the patch I was working with, if you're interested. I don't think we want to go this way, since it breaks auto_ptr, but perhaps we don't need the auto_ptr hack in C++0x since we have rvalue references...