[libcxx-commits] [PATCH] D102727: Use precise growth rather than amortized growth in std::string::resize/__resize_default_init.
Martijn Vels via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 15 16:48:24 PDT 2021
mvels added inline comments.
================
Comment at: libcxx/include/string:3280
+ if (__n > __sz) {
+ if (__n > capacity()) __shrink_or_extend(__recommend(__n));
append(__n - __sz, __c);
----------------
ldionne wrote:
> Please put the `__shrink_or_extend` call on its own line (same below).
as per my general comment, I'd suggest putting this inside #if defined(_LIBCPP_ABI_UNSTABLE)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102727/new/
https://reviews.llvm.org/D102727
More information about the libcxx-commits
mailing list