------- Comment #9 from jwakely dot gcc at gmail dot com 2009-06-23 18:40 ------- The library pieces of Doug's patch that still need to be applied are:
* include/std/tuple (_Tuple_impl): Use lvalue references when explicitly specifying the template argument to std::move. * include/std/iosfwd (operator<<): Provide a forwarding operator<< that accepts rvalue streams. (operator>>): Ditto. * include/bits/stl_iterator.h (move_iterator::operator*): Explicitly std::move the result, to convert it to an rvalue reference. * include/bits/stl_move.h (forward): Forward lvalues (which may end up being turned into rvalues). (move): Explicitly static_cast to an rvalue. * testsuite/27_io/rvalue_streams.cc: New; test the use of rvalue streams. Works except for the fact that we can't call str() on the result. (This is an existing issue). I think the move_iterator and tuple changes would be OK to apply now but the stream parts have a FIXME and as discussed, the definition of std::move is undecided. I'll come back to this soon. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40486