[libcxx-commits] [PATCH] D148693: [libc++] Set correct size at the end of growing std::string
Tacet via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 21 02:39:03 PDT 2023
AdvenamTacet added a comment.
> Maybe we could make a new function that calls __grow_by which has the correct postconditions?
Sounds good to me. As `__grow_by_and_replace` exists, maybe a new function may be named `__grow_by_without_replace`? I have no idea.
---
While I was reading it, I realized that my patch suggestion is also incorrect. It should be `__set_long_size(__old_sz - __n_del + __n_add)`, I will appreciate if someone confirms it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148693/new/
https://reviews.llvm.org/D148693
More information about the libcxx-commits
mailing list