Well, probably is just one of his friends.
Uhm... A very-very-good-friend since he knows about his CPaccount details.
Oh Yes, he was his best friend.
Now everyone knows that somebody's best friend is just himself, hence... I'm confused Holmes, please explain...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
According to standard, the code should not compile.
What do you mean with standard?
As far as I can tell the snippit looks fine. And i think that the manual is wrong on this one.
They state: In get_i(), i is not used in a dependent context according to me this is wrong since i is without any doubt the Base<T>::i which is known.
the compiler does not look in dependent base classes (like B<t> when looking up nondependent names (like f).
This is correct Visual Studio compiles the non-valid code without any troubles
2. What disadvantage do we have if the code can compile?
Thats a hard one since Visual Studio compiles and provides the correct solution. Even when there are global variables or function is correctly understand what the programmer wants and does a check the base class first.
This brings us too two other questions one might ask.
1. Can one write code which breaks this rule? Meaning, can on write code that explicit calls the global function instead of the base function?
2. If this is not possible, why does the rule: the compiler does not look in dependent base classes (like B<t> when looking up nondependent names (like f). exist? Is it because older compilers where not smart enough to clear this up?