aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/pr60390.C
blob: 5cd5539f82e81bb92cd87592ef5fc686d34958d6 (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++1y } }
// { dg-options "" }

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);
}