1 2 3 4 5 6 7 8 9 10 11 12 13 14 | struct Base { void *m () { return 0; } const void *m () const { return 0; } }; struct Yes : Base { }; struct No : Base { using Base::m; }; int main (int argc, char *argv[]) { void *p; p = Base().m(); // ok by default p = Yes().m(); // ok by inheritance p = No().m(); // should be ok by "using"; not under g++ 3.x } |