summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ptrmem1.C
blob: 8ebc61c517c894687978eb296be381fd4ca5291a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do run  }
class foo
{
public:
  template<class T>
  T bar() { return 7; }
};

int
main()
{
  foo f;
  
  int (foo::*s)() = &foo::bar<int>;
  if ((f.*s)() == 7)
    return 0;
  else 
    return 1;
}