gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat5.C
raw| 1 | // PR c++/100288 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct A { }; |
| 5 | |
| 6 | template<typename T> concept pipeable = requires(A a, T t) { a | t; }; |
| 7 | // { dg-error "with T = int]' depends on itself" "" { target *-*-* } .-1 } |
| 8 | |
| 9 | template<pipeable T> void operator|(A, T); |
| 10 | |
| 11 | void f(A tab) { |
| 12 | tab | 1; // { dg-error "no match" } |
| 13 | tab | 1; // { dg-error "no match" } |
| 14 | } |