summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/partial5.C
blob: 64f46d48cc536f9da10186b37c6f3bd2a2ecd154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do run  }
// Test that partial ordering ignores defaulted parms and 'this'.

struct A {
  template<class T> int f(T) { return 1; }
  template<class T> int f(T*, int=0) { return 0; }
  template<class T> int g(T*) { return 0; }
  template<class T> static int g(T, int=0) { return 1; }
  template<class T> int h(T*) { return 0; }
  template<class T> static int h(T, int=0) { return 1; }
  template<class T> static int j(T*, short y=0) { return 0; }
  template<class T> static int j(T, int=0) { return 1; }
};

int main(void) {
  A a;
  int *p;
  return (a.f(p) || a.g(p) || a.h(p) || a.j(p));
}