blob: f3481b6731e4d55d76978c6cf730fdfb5737c10f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// CWG2596
// { dg-do compile { target c++20 } }
struct Base {};
template<int N>
struct S : Base {
friend int foo(Base&) requires (N == 1); // { dg-error "must be a definition" }
friend int foo(Base&) requires (N == 2); // { dg-error "must be a definition" }
template <class T>
friend int bar(Base&) requires (N == 1); // { dg-error "must be a definition" }
template <class T>
friend int bar(Base&) requires (N == 2); // { dg-error "must be a definition" }
};
|