[libcxx-commits] [libcxx] [libc++][ranges] Ensure range access CPOs are provided in `<iterator>` (PR #151745)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 8 19:17:47 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.
----------------
huixie90 wrote:
I am not sure if we only need this compile time test. I'd interpret "are available" as "are usable". i.e. if an implementation splits the declaration and definition into different headers and only includes declaration from <iterator>, I'd like to see the test fail. in short, i think it might be worth to exercise these cpo at runtime instead of just testing invocable
https://github.com/llvm/llvm-project/pull/151745
More information about the libcxx-commits
mailing list