[libcxx-commits] [libcxx] [libc++][ranges][enumerate_view] Fix iterator converting constructor test (PR #212044)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 20 05:23:17 PDT 2026
================
@@ -27,8 +27,44 @@
#include "test_iterators.h"
+#include "../../range_adaptor_types.h"
#include "../types.h"
+using ConstIterIncompatibleView =
+ BasicView<forward_iterator<int*>,
+ forward_iterator<int*>,
+ random_access_iterator<const int*>,
+ random_access_iterator<const int*>>;
+static_assert(!std::is_convertible_v<std::ranges::iterator_t<ConstIterIncompatibleView>,
+ std::ranges::iterator_t<const ConstIterIncompatibleView>>);
+
+constexpr void test_SFINAE() {
----------------
frederick-vs-ja wrote:
Mostly LGTM except that this function is wrong to me. In this function, we're `assert`ing results of actual evaluation. So probably we shouldn't say `test_SFINAE`.
Maybe we can split this function into two, or just manually inline it into `test`.
https://github.com/llvm/llvm-project/pull/212044
More information about the libcxx-commits
mailing list