aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-10-29 01:05:03 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-10-29 01:28:12 +0000
commitc6bfc4eb3c961181912647781d7dd38057db655b (patch)
treeb4b3e15100e1eafc08e9ff3bb2db71d9b8a5be39
parent0cdde1e7ae197366e17e5ef50bf68d4d5760df01 (diff)
downloadgcc-c6bfc4eb3c961181912647781d7dd38057db655b.zip
gcc-c6bfc4eb3c961181912647781d7dd38057db655b.tar.gz
gcc-c6bfc4eb3c961181912647781d7dd38057db655b.tar.bz2
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.
-rw-r--r--libstdc++-v3/include/std/sstream4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
index f03f3ab..33a0048 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<typename _SAlloc>
basic_stringbuf(const basic_string<_CharT, _Traits, _SAlloc>& __s,