[libcxx-commits] [libcxx] [libc++][ranges] Implement `ranges::stride_view`. (PR #65200)
Will Hawkins via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 11 07:27:59 PST 2023
================
@@ -0,0 +1,30 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+// UNSUPPORTED: no-exceptions
+// UNSUPPORTED: !libcpp-hardening-mode=debug
+// XFAIL: availability-verbose_abort-missing
+
+// <ranges>
+
+// Call ....
+
+#include "check_assertion.h"
+#include <ranges>
+
+void operator_plus_equal_past_end_is_illegal() {
+ int range[] = {1, 2, 3};
+ auto striv = std::ranges::views::stride(range, 2);
+ auto striv_it = striv.begin();
+ TEST_LIBCPP_ASSERT_FAILURE(striv_it += 3, "Advancing the iterator beyond the end is not allowed.");
+}
+int main() {
----------------
hawkinsw wrote:
I believe that this is addressed in 93e5bcfea6792e9f8e28e0199b372819f61ddd71.
https://github.com/llvm/llvm-project/pull/65200
More information about the libcxx-commits
mailing list