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/] [ptrmem6.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do assemble }
class A {
public:
virtual void f();
int i;
};
class B : public A {
public:
void f();
int j;
};
template <void (A::*)() >
void g() {}
template <int A::*>
void h() {}
int main() {
g<&A::f>();
h<&A::i>();
g<&B::f>(); // { dg-error "" }
h<&B::j>(); // { dg-error "" }
g<(void (A::*)()) &A::f>(); // { dg-error "" }
h<(int A::*) &A::i>(); // { dg-error "" }
g<(void (A::*)()) &B::f>(); // { dg-error "" }
h<(int A::*) &B::j>(); // { dg-error "" }
g<(void (A::*)()) 0>(); // { dg-error "" }
h<(int A::*) 0>(); // { dg-error "" }
return 0;
}