We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44d6a65 commit 7fe7264Copy full SHA for 7fe7264
libcxx/test/libcxx/ranges/range.utility/range.utility.conv/to.verfiy.cpp
libcxx/test/libcxx/ranges/range.utility/range.utility.conv/to.verify.cpp
@@ -0,0 +1,15 @@
1
+#include <ranges>
2
+
3
+void test() {
4
+ struct R {
5
+ int* begin() const { reurn nullptr; };
6
+ int* end() const { return nullptr; };
7
8
+ operator int() const { return 0; }
9
+ };
10
+ (void)std::ranges::to<int>(R{});
11
+ //expected-error-re@*:* {{static assertion failed{{.*}}The target must be a class type}}
12
+ (void)(R{} | std::ranges::to<int>());
13
14
15
+}
0 commit comments