gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | |
| 3 | template<class T, class U> |
| 4 | concept Same = __is_same_as(T, U); |
| 5 | |
| 6 | template<typename T> |
| 7 | concept C1 = true; |
| 8 | |
| 9 | template<typename T, typename U> |
| 10 | concept C2 = true; |
| 11 | |
| 12 | C1 auto c1 = 0; |
| 13 | C2<int> auto c2 = 0; |
| 14 | Same<int> auto s1 = 'a'; // { dg-error "does not satisfy|is_same" } |