1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 17 Mar 2005 <nathan@codesourcery.com>
3 
4 // PR 20465
5 // Origin: Matthias Klose <doko@debian.org>
6 //	   Andrew Pinski <pinskia@gcc.gnu.org>
7 
8 template <class _Ret, class _Tp>
9 void mem_fun_ref(_Ret (_Tp::*__f)());
10 
11 struct A {
12   double f();
13 };
14 
h()15 void h ()
16 {
17   mem_fun_ref(&A::f);
18 }
19 
20 template <class T>
f()21 void f()
22 {
23   mem_fun_ref(&A::f);
24 }
25 
g()26 void g()
27 {
28   f<int>();
29 }
30