Debian Codegraph @

libstdc++-v3/testsuite/std/ranges/conv/112803.cc

raw
1 // { dg-do compile { target c++23 } }
2
3 // Bug 112803 - <ranges>: to(Args&&... args) is missing Mandates
4
5 #include <ranges>
6
7 void
8 test()
9 {
10 struct C { };
11
12 (void) std::ranges::to<int>(); // { dg-error "here" }
13 (void) std::ranges::to<C*>(); // { dg-error "here" }
14 (void) std::ranges::to<C&>(); // { dg-error "here" }
15 (void) std::ranges::to<const C>(); // { dg-error "here" }
16 (void) std::ranges::to<volatile C>(); // { dg-error "here" }
17 (void) std::ranges::to<const volatile C>(); // { dg-error "here" }
18 }
19
20 // { dg-error "static assertion failed" "" { target *-*-* } 0 }