[libcxx-commits] [PATCH] D151896: [libc++] Implement C++20 P0408R7 (Efficient Access to basic_stringbuf's Buffer)

Piotr Fusik via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 20 10:34:51 PDT 2023


pfusik added inline comments.


================
Comment at: libcxx/include/sstream:468
     __hm_ = __hm == -1 ? nullptr : __p + __hm;
     __p = const_cast<char_type*>(__rhs.__str_.data());
     __rhs.setg(__p, __p, __p);
----------------
Mordante wrote:
> Use after move of `__rhs.__str_`.
> 
> Note this was existing, but is a bug.
What fix would you suggest?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151896/new/

https://reviews.llvm.org/D151896



More information about the libcxx-commits mailing list