[libcxx-commits] [PATCH] D101675: [libc++] [LIBCXX-DEBUG-FIXME] Fix an iterator-invalidation issue in string::assign.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 2 06:51:22 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/include/string:2362
     }
-    else
-        __invalidate_iterators_past(__n);
     value_type* __p = _VSTD::__to_address(__get_pointer());
     traits_type::assign(__p, __n, __c);
----------------
Mordante wrote:
> Is this change really required? We don't use our own iterators in this case.
> I'm not objecting against this change.
> 
I believe this change is not required; but yeah, it seemed like a good idea for consistency.
The CI job was failing because D101003 hadn't landed in `main` yet when it kicked off; I'll rebase to prove it's OK.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101675



More information about the libcxx-commits mailing list