| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s |
| 2 |
|
| 3 |
template<class> |
| 4 |
concept fooable = true; |
| 5 |
|
| 6 |
struct S { |
| 7 |
template<class> friend concept x = requires { requires true; }; // expected-error {{friend declaration cannot be a concept}} |
| 8 |
template<class> friend concept fooable; // expected-error {{friend declaration cannot be a concept}} |
| 9 |
template<class> concept friend fooable; // expected-error {{expected unqualified-id}} |
| 10 |
friend concept fooable; // expected-error {{friend declaration cannot be a concept}} |
| 11 |
concept friend fooable; // expected-error {{friend declaration cannot be a concept}} |
| 12 |
concept fooable; // expected-error {{concept declarations may only appear in global or namespace scope}} |
| 13 |
}; |