3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 31 Dec 2001 <nathan@codesourcery.com>
6 // PR 3716 tsubsting a pointer to member function did not create a
7 // pointer to member function.
9 template <class C, class T, T C::*M>
12 T operator() (C & c) const { return (c.*M); }
15 template <class C, class T, T (C::* M)()>
16 struct Closure<C, T (), M>
18 T operator()(C & c) const { return (c.*M)(); }
26 static Closure<A, int (), & A::get> get_closure;