[libcxx-commits] [libcxx] [libc++][ranges] Add `convertible_to` test case for `enumerate_view` iterator ctor test (PR #212044)
Lucas Mellone via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jul 25 10:30:26 PDT 2026
https://github.com/lknknm created https://github.com/llvm/llvm-project/pull/212044
Follows up the comment https://github.com/llvm/llvm-project/pull/73617/changes#r1416641551 from https://github.com/llvm/llvm-project/pull/73617
>From a7ca704bbf976908f4c938f89d4ca63488a65cae Mon Sep 17 00:00:00 2001
From: Lucas Mellone <github.snugness349 at passinbox.com>
Date: Sat, 25 Jul 2026 19:28:15 +0200
Subject: [PATCH] add: static_assert for convertible_to
---
.../range.enumerate/iterator/ctor.convert.pass.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/libcxx/test/std/ranges/range.adaptors/range.enumerate/iterator/ctor.convert.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.enumerate/iterator/ctor.convert.pass.cpp
index f441de92f6a60..083b01e178daa 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.enumerate/iterator/ctor.convert.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.enumerate/iterator/ctor.convert.pass.cpp
@@ -43,6 +43,7 @@ constexpr void test() {
};
static_assert(std::is_convertible_v<EnumerateIterator, EnumerateConstIterator>);
+ static_assert(std::convertible_to<EnumerateIterator, EnumerateConstIterator>);
std::array array{0, 84, 2, 3, 4};
auto view = make_enumerate_view(array.begin(), array.end());
More information about the libcxx-commits
mailing list