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 8template <class _Ret, class _Tp> 9void mem_fun_ref(_Ret (_Tp::*__f)()); 10 11struct A { 12 double f(); 13}; 14 15void h () 16{ 17 mem_fun_ref(&A::f); 18} 19 20template <class T> 21void f() 22{ 23 mem_fun_ref(&A::f); 24} 25 26void g() 27{ 28 f<int>(); 29} 30