summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/ptrmem19.C
blob: 52711c6cb688cbd75aa44b2a0156a195fa7ddc3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/40780
// { dg-do compile }

template <class T1, typename T2, typename T3>
struct A
{
  typedef T2 (T1::*m) (T3);
  A (m) {}
};
struct B;
struct C
{
  void foo (B *);
};
typedef A <C, void, B *> D;
typedef void (C::*E) (B *);
struct F;
typedef void (C::*G) (F);
D d ((E) (G) & C::foo);