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

Johan Lundberg <lundberj at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lundberj at gmail dot com
         Depends on|                            |53626

--- Comment #1 from Johan Lundberg <lundberj at gmail dot com> 2012-08-18 
18:42:09 UTC ---
std::stringstream should be move constructable but there is no move constructor
declared in include/std/sstream. 

This missing C++11 feature is dependent on basic_ios
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53626#add_comment) but additional
work seem to be required for stringsteam and other dependent classes.

The relevant standard section is 27.8.5 (Class template basic_stringstream).

  regards J. 

//Minimal example:
#include <sstream>
#include <utility>
std::stringstream getss(){
   std::stringstream q;
   return std::move(q);
}

compile_testtmp.cpp: In function ‘std::stringstream getss()’:
compile_testtmp.cpp:7:22: error: use of deleted function
‘std::basic_stringstream<char>::basic_stringstream(const
std::basic_stringstream<char>&)’
In file included from compile_testtmp.cpp:2:0:
/usr/include/c++/4.7/sstream:485:11: note:
‘std::basic_stringstream<char>::basic_stringstream(const
std::basic_stringstream<char>&)’ is implicitly deleted because the default
definition would be ill-formed:
/usr/include/c++/4.7/sstream:485:11: error: use of deleted function
‘std::basic_iostream<char>::basic_iostream(const std::basic_iostream<char>&)’
In file included from /usr/include/c++/4.7/sstream:39:0,
                 from compile_testtmp.cpp:2:
/usr/include/c++/4.7/istream:789:11: note:
‘std::basic_iostream<char>::basic_iostream(const std::basic_iostream<char>&)’
is implicitly deleted because the default definition would be ill-formed:
/usr/include/c++/4.7/istream:789:11: error: use of deleted function
‘std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)’
/usr/include/c++/4.7/istream:56:11: note:
‘std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)’ is
implicitly deleted because the default definition would be ill-formed:
/usr/include/c++/4.7/istream:56:11: error: use of deleted function
‘std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)’

... and further similar (~50 lines).

Reply via email to