URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [ptrmem4.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do link }
template<class T,class T1>
int connect_to_method(T* receiver,
int (T1::*method)())
{
return (receiver->*method)();
}
class Gtk_Container
{
public:
int remove_callback() { return 1; }
void remove_callback(int);
int f();
};
int Gtk_Container::f()
{
return connect_to_method(this, &Gtk_Container::remove_callback);
}
int main()
{
Gtk_Container gc;
if (gc.f () != 1)
return 1;
}