http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52442
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-29 21:44:21 UTC --- You're right, it can't be used like that, but it's not meant to be. By design temporary_buffer is not copyable, so it's not swappable either.