diff --git a/libcxx/include/sstream b/libcxx/include/sstream --- a/libcxx/include/sstream +++ b/libcxx/include/sstream @@ -420,10 +420,9 @@ this->__pbump(__nout); } __hm_ = __hm == -1 ? nullptr : __p + __hm; - __p = const_cast(__rhs.__str_.data()); - __rhs.setg(__p, __p, __p); - __rhs.setp(__p, __p); - __rhs.__hm_ = __p; + __rhs.setg(nullptr, nullptr, nullptr); + __rhs.setp(nullptr, nullptr); + __rhs.__hm_ = nullptr; this->pubimbue(__rhs.getloc()); } @@ -467,10 +466,9 @@ __hm_ = __hm == -1 ? nullptr : __p + __hm; __mode_ = __rhs.__mode_; - __p = const_cast(__rhs.__str_.data()); - __rhs.setg(__p, __p, __p); - __rhs.setp(__p, __p); - __rhs.__hm_ = __p; + __rhs.setg(nullptr, nullptr, nullptr); + __rhs.setp(nullptr, nullptr); + __rhs.__hm_ = nullptr; this->pubimbue(__rhs.getloc()); return *this; }