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 7515cdb commit 44d6a65Copy full SHA for 44d6a65
libcxx/test/libcxx/ranges/range.utility/range.utility.conv/to.verfiy.cpp
@@ -0,0 +1,17 @@
1
+#include <ranges>
2
+
3
4
5
+void test(){
6
+ struct R {
7
+ int* begin() const{reurn nullptr;};
8
+ int* end() const{return nullptr;};
9
10
+ operator int() const { return 0; }
11
+ };
12
+ (void)std::ranges::to<int>(R{});
13
+ //expected-error-re@*:* {{static assertion failed{{.*}}The target must be a class type}}
14
+ (void)(R{} | std::ranges::to<int>());
15
16
17
+}
0 commit comments