[libcxx-commits] [libcxx] [libc++][ranges] Ensure range access CPOs are provided in `<iterator>` (PR #151745)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 13 16:26:19 PDT 2025
================
@@ -0,0 +1,60 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++20
+
+// [range.access.general]/1:
+// In addition to being available via inclusion of the <ranges> header, the customization point objects in
+// [range.access] are available when the header <iterator> is included.
----------------
ldionne wrote:
I think it would be simple to test this at runtime as well, and I agree with @huixie90 's comment that the current test is insufficient. Right now the test will pass if the CPOs are only declared but not defined.
https://github.com/llvm/llvm-project/pull/151745
More information about the libcxx-commits
mailing list