I am reading from ebook Templates complete guide and question which i'm gonna ask might be stupid to you but..
There is section in that 9.4.2 Dependent Base Classes which i am unable to understand.
Here is the partial text from it: http://tinypaste.com/633f0
// Variation 2:
template<typename T>
class DD2 : public Base<T> {
public:
void f() { Base<T>::basefield = 0; }
};
I need help visualizing the line (or problem domain) in text above "Care must be taken with this solution, because if the unqualified nondependent name is used to form a virtual function call, then the qualification inhibits the virtual call mechanism and the meaning of the program changes. Nonetheless, there are situations when the first variation cannot be used and this alternative is appropriate"
I understand unqualified nondependent name etc but mixing them with virtual function call is what eluding me.
If the qualified name ( basefield ) is a virtual function, then the qualification inhibits the virtual call. It's very much the same as if you have: