From: Jonathan Wakely Date: Thu, 29 Oct 2020 01:05:03 +0000 (+0000) Subject: libstdc++: Fix new basic_stringbuf constructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6bfc4eb3c961181912647781d7dd38057db655b;p=gcc.git libstdc++: Fix new basic_stringbuf constructor libstdc++-v3/ChangeLog: * include/std/sstream (basic_stringbuf(__string_type&&, openmode)): Call _M_init_syncbuf to set up get/put areas. Also qualify std::move. --- diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream index f03f3abd6fc..33a00486606 100644 --- a/libstdc++-v3/include/std/sstream +++ b/libstdc++-v3/include/std/sstream @@ -181,8 +181,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 basic_stringbuf(__string_type&& __s, ios_base::openmode __mode = ios_base::in | ios_base::out ) - : __streambuf_type(), _M_mode(__mode), _M_string(move(__s)) - { } + : __streambuf_type(), _M_mode(__mode), _M_string(std::move(__s)) + { _M_stringbuf_init(__mode); } template basic_stringbuf(const basic_string<_CharT, _Traits, _SAlloc>& __s,