1// { dg-do link  }
2
3template<class T,class T1>
4int connect_to_method(T* receiver,
5                      int (T1::*method)())
6{
7  return (receiver->*method)();
8}
9
10class Gtk_Container
11{
12public:
13  int remove_callback() { return 1; }
14  void remove_callback(int);
15  int f();
16};
17
18int Gtk_Container::f()
19{
20  return connect_to_method(this, &Gtk_Container::remove_callback);
21}
22
23int main()
24{
25  Gtk_Container gc;
26  if (gc.f () != 1)
27    return 1;
28}
29