aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-pr60390.C
blob: a453d1d61a3911d3d15389b44788df29ab1dcc71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// PR c++/60390
// { dg-do compile { target c++14 } }
// { dg-additional-options "-fconcepts" }

struct A
{
  void foo (auto);
};

class B
{
  int m;
  friend void A::foo (auto);
};

void A::foo (auto i)
{
  B b;
  b.m = i;
}

int main ()
{
  A a;
  a.foo (7);
}