<div dir="ltr">Hello,<div><br></div><div>Folks on OFTC #llvm channel suggested I post to this mailing list about the following snippet (<a href="http://goo.gl/fayMFH">http://goo.gl/fayMFH</a>):</div><div><br></div><div><div>struct A</div><div>{</div><div>  template<typename T></div><div>  A& B() { return *this; }</div><div>};</div><div><br></div><div>template<typename T></div><div>struct B</div><div>{</div><div>};</div><div><br></div><div>int main()</div><div>{</div><div>  A().B<int>();</div><div>  return 0;</div><div>}</div></div><div><br></div><div>Clang++ emits the following warning:</div><div><br></div>14 : warning: lookup of 'B' in member access expression is ambiguous; using member of 'A' [-Wambiguous-member-template]<div><br></div><div>I had the impression there's no ambiguity: in that case, it must be the member function call.</div><div><br></div><div>Am I right to believe Clang++ emits a warning erroneously?</div><div><br></div><div>Regards,</div><div>Gregory</div></div>