Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Member Function Lookup

Name: Anonymous 2010-02-06 12:22

I'm reading `C++ Common Knowledge' to find out more about this fascinating pile of crap. I'm currently in the section `Member Function Lookup' and discovered this gem:

class Foo {
public:
        void x(int) {}
};

class Bar : Foo {
        int x; /* This is fuckin' private. */
};

int main()
{
        Bar bar;
        bar.x(3);
        return 0;
}


I understand what it does and why it does it, but what the fuck was Bjarne thinking when he decided this? If this is object-oriented programming, I'm Ada Lovelace. HIBT?

Name: Anonymous 2010-02-06 14:49

>>6
Why not replace funcall with a special symbol via reader macro, then? The only thing special about funcall is that it requires the function to be passed in the variable namespace.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List