title: C++ method call and type scope resolution ambiguity
body: <p>I hope the title actually describes what I wanted to ask...</p>
  
  <p>I wrote a piece of code that compiles with gcc and works as I intended.  However, it does not compile with llvm and the code executes differently when compiled with icc!<br>
  Here is an example of the problem:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using std::cout; using std::endl;
  
  class A {
  public:
    virtual void foo() { cout &lt;&lt; "A::foo()" &lt;&lt; endl; }
  };
  
  class B : public A {
  public:
    typedef A  base;
    virtual void foo() { cout &lt;&lt; "B::foo()" &lt;&lt; endl; }
  };
  
  int main() {
    typedef B  base;
    base* bp = new B();
    bp-&gt;base::foo(); 
  }
  </code></pre>
  
  <p>gcc output:  A::foo()<br>
  icc output:  B::foo()</p>
  
  <p>Could somebody explain what does the standard say about this case?  </p>