When calling a member function, the name lookup can lead to surprising behaviour. Name lookup operates in steps and will stop when it encounters any match; this includes non-viable matches. The lookup always starts in the class type scope that matches the variable's static type, not the dynamic type of the object. Compiler Explorer link: https://lnkd.in/ecPKR4M2 #cpp #cplusplus #coding #programming #dailybiteofcpp
You should have put a few virtual functions in there for completeness BTW
I read through all this crap not to get surprised. Is this a troll post, or did I just miss the point?
But not a bad post 👍
m374-crypt0•880 followers
2yWow first time I see this syntax in MixinB: `this auto &self`. I can't find something talking about this in en.cppreference.com so far. Is it to specify a member method owned by any type in the inheritance hierarchy? I'm gonna look for the way it could be re-written when not using template deduction stuff...