You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With GCC 4.9.3 (debian linux) I get compilation errors related to the lack of copy constructor in std::stringstream:
Scanning dependencies of target di
In file included from /home/manuel-sanchez/Documentos/iod/tests/../iod/json.hh:15:0,
from /home/manuel-sanchez/Documentos/iod/tests/deep_merge.cc:4:
/home/manuel-sanchez/Documentos/iod/tests/../iod/json_unicode.hh: In function ‘decltype(auto) iod::wrap_json_input_stream(const iod::stringview&)’:
/home/manuel-sanchez/Documentos/iod/tests/../iod/json_unicode.hh:64:96: error: use of deleted function ‘std::basic_stringstream<char>::basic_stringstream(const std::basic_stringstream<char>&)’
wrap_json_input_stream(const iod::stringview& s) { return std::stringstream(s.to_std_string()); }
^
In file included from /home/manuel-sanchez/Documentos/iod/tests/../iod/json.hh:9:0,
from /home/manuel-sanchez/Documentos/iod/tests/deep_merge.cc:4:
/usr/include/c++/4.9/sstream:502:11: note: ‘std::basic_stringstream<char>::basic_stringstream(const std::basic_stringstream<char>&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_stringstream : public basic_iostream<_CharT, _Traits>
^
/usr/include/c++/4.9/sstream:502: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.9/iostream:40:0,
from /home/manuel-sanchez/Documentos/iod/tests/deep_merge.cc:1:
/usr/include/c++/4.9/istream:795:11: note: ‘std::basic_iostream<char>::basic_iostream(const std::basic_iostream<char>&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_iostream
^
What I can say from the output is that it seems that for some reason that function is not triggering RVO and the stdlibc++ stream has no move constructor (So the compiler picks the copy ctor instead).
UPDATE: After adding gcc 4.9 to the build matrix I see that the "issue" is just that the library no longer supports GCC 4.9 in its current form.
Do you have plans to maintain compatibility with GCC 4.9?
The text was updated successfully, but these errors were encountered:
Manu343726
changed the title
std::istringstream copy?
std::stringstream copy?
Mar 14, 2018
With GCC 4.9.3 (debian linux) I get compilation errors related to the lack of copy constructor in
std::stringstream
:What I can say from the output is that it seems that for some reason that function is not triggering RVO and the stdlibc++ stream has no move constructor (So the compiler picks the copy ctor instead).
UPDATE: After adding gcc 4.9 to the build matrix I see that the "issue" is just that the library no longer supports GCC 4.9 in its current form.
Do you have plans to maintain compatibility with GCC 4.9?
The text was updated successfully, but these errors were encountered: