[libcxx-commits] [libcxx] WIP [libc++][ranges] Add `convertible_to` test case for `enumerate_view` iterator ctor test (PR #212044)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 27 06:27:42 PDT 2026
================
@@ -43,6 +43,7 @@ constexpr void test() {
};
static_assert(std::is_convertible_v<EnumerateIterator, EnumerateConstIterator>);
+ static_assert(std::convertible_to<EnumerateIterator, EnumerateConstIterator>);
----------------
frederick-vs-ja wrote:
Ah, I see.
- First, I think we should use stronger `convertible_to` for this positive test case.
- Second, we should test some negative cases - in the case that implicit conversion can't be performed for underlying iterators, we should verify that `static_assert(!std::is_convertible_v<...>);`.
https://github.com/llvm/llvm-project/pull/212044
More information about the libcxx-commits
mailing list