URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [ptrmem4.C] - Rev 384
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;
}