aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-friend17.C
blob: 9b5091f14a811770fc2afb0ae080029d6dbc19a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/113966
// { dg-do compile { target c++20 } }

template<class T> concept C = T::value;

template<class T>
struct A {
  template<class U> requires U::value || requires { { T() } -> C; }
  friend void f(A, U) { }

  template<class U> requires requires { { g(U()) } noexcept; }
  friend void f(A, U, U) { }
};

template struct A<int>;