aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
blob: 946e6244f4a95956a8c910f91a3472a979b7b548 (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
27
28
29
30
31
32
33
34
// Build don't link:

class A {
public:
  virtual void f();
  int i;
};

class B : public A {
public:
  void f();
  int j;
};

template <void (A::*)() >
void g() {}
template <int A::*>
void h() {}


int main() {
  g<&A::f>();
  h<&A::i>();
  g<&B::f>(); // ERROR - 
  h<&B::j>(); // ERROR - 
  g<(void (A::*)()) &A::f>(); // ERROR - XFAIL *-*-*
  h<(int A::*) &A::i>(); // ERROR - 
  g<(void (A::*)()) &B::f>(); // ERROR - 
  h<(int A::*) &B::j>(); // ERROR - 
  g<(void (A::*)()) 0>(); // ERROR - 
  h<(int A::*) 0>(); // ERROR - 

  return 0;
}