libstdc++: Fix new basic_stringbuf constructor
authorJonathan Wakely <jwakely@redhat.com>
Thu, 29 Oct 2020 01:05:03 +0000 (01:05 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 29 Oct 2020 01:28:12 +0000 (01:28 +0000)
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.

libstdc++-v3/include/std/sstream

index f03f3abd6fc3c0c01abdd0be669882a873ebbc31..33a00486606ccbd3b32516e7e5900a0e6f757498 100644 (file)
@@ -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<typename _SAlloc>
       basic_stringbuf(const basic_string<_CharT, _Traits, _SAlloc>& __s,