[libcxx-commits] [libcxx] WIP [libc++][ranges] P3060R3 Add std::views::indices(n) (PR #146823)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 3 05:59:04 PDT 2025


================
@@ -392,6 +392,16 @@ struct __fn {
 inline namespace __cpo {
 inline constexpr auto iota = __iota::__fn{};
 } // namespace __cpo
+
+
+#  if _LIBCPP_STD_VER >= 26
+
+inline constexpr auto indices = [](__integer_like auto __size) {
----------------
frederick-vs-ja wrote:

`libcxx/modules/std/ranges.inc` should also be changed.

Also, is there any particular reason not to make this lambda `static`?

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


More information about the libcxx-commits mailing list