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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 2 06:41:35 PDT 2021


Mordante added a comment.

SGTM except for a minor question. Do you know why the debug iterator CI job fails?



================
Comment at: libcxx/include/string:1787
+#else
+    (void)__pos;
 #endif // _LIBCPP_DEBUG_LEVEL == 2
----------------
I like this change!


================
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);
----------------
Is this change really required? We don't use our own iterators in this case.
I'm not objecting against this change.



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