[libcxx-commits] [libcxx] [libc++][hardening] Categorize more assertions. (PR #75918)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 22 12:11:22 PST 2023


================
@@ -77,9 +78,10 @@ class chunk_by_view : public view_interface<chunk_by_view<_View, _Pred>> {
   _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_View> __find_prev(iterator_t<_View> __current)
     requires bidirectional_range<_View>
   {
-    _LIBCPP_ASSERT_UNCATEGORIZED(
-        __current != ranges::begin(__base_), "Trying to call __find_prev() on a begin iterator.");
-    _LIBCPP_ASSERT_UNCATEGORIZED(
+    // Attempting to increment an end iterator is a no-op (`__find_next` would return the same argument given to it).
----------------
mordante wrote:

Is this comment copy pasted? If not, it's very confusion.

https://github.com/llvm/llvm-project/pull/75918


More information about the libcxx-commits mailing list