Thanks for your response and I'm really sorry to answer so late.<div><br></div><div>I don't think the problem is ADL here. The name of the function call is a dependant name, so the unqualified lookup is delayed until instanciation: it's not ADL, it's just delayed ordinary lookup. At instanciation time and when all explicit template specializations are available, lookups can be done in the base class to find members.</div>

<div><br></div><div>This example compiles without any complain on g++ and I'm going to verify with VS2010 and intel compiler, but I'm pretty sure it compiles as well using these compilers.</div><div><br></div><div>

I'm still not sure why this is not a bug of clang.</div><div><br></div><div>Cheers,</div><div>Adrien</div><div><br></div><div><br><br><div class="gmail_quote">On Sat, Dec 4, 2010 at 11:28, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Dec 4, 2010, at 2:12 AM, Adrien Chauve wrote:<br>
> Thanks for the link, it's exactly what I was searching for.<br>
><br>
> But I'm not sure my example code (ant the example on the page you pointed at) is invalid. In case of a function call where at least one argument is a template dependant name, the call should not be qualified (cf "C++ Templates The Complete Guide" by D. Vandervoorde and N. M. Josuttis, section 9.4.2 pp 136-138).<br>


<br>
</div>The rule is that (1) if the lookup at definition time doesn't find a class member and (2) there's at least one type-dependent argument then (3) we can't resolve the call at definition time because we have to do argument-dependent lookup during instantiation.  ADL never find class members, though.<br>


<br>
The bug in gcc is that it also performs unqualified lookup at instantiation time and therefore finds class members from previously-dependent base classes that it's really not supposed to find.<br>
<font color="#888888"><br>
John.</font></blockquote></div><br></div>