summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/anonunion1.C
blob: 89a8c5bec9ccb4ab175bb4c00df431dfe50c2e02 (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
// PR c++/47303
// { dg-do compile }
// { dg-options "-fabi-version=1" }

struct Z
{
  void foo (int);
};

struct F
{
  typedef void (Z::*zm) (int);
  typedef void (F::*fm) (int);
  template <zm>
  void bar (int)
  {
    union
    {
      Z z;
    };
  }
};

F::fm m = &F::bar <&Z::foo>;