I just tested with intel c++ compiler 12.<div>Indeed, the compilation fails when using the "-strict-ansi" option.</div><div><br></div><div>Thanks,</div><div>Adrien<br><br><div class="gmail_quote">On Wed, Dec 15, 2010 at 21:24, Adrien Chauve <span dir="ltr"><<a href="mailto:adrien.chauve@gmail.com">adrien.chauve@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Ok then, thank you very much John and Matt for your answers. I'm convinced!!<div><br></div><div>Is it a known error in "C++ Templates: The Complete Guide", or am I getting it wrong?</div>

<div><br></div><div>Thanks again,</div>
<div>Adrien</div><div><br></div><div>P.S.: Matt, it seems that you replied only to me, but your quote was really nice so I copy it here:</div><div class="im"><div><br></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>


>From the standard [temp.dep]:</div><div><br></div><div>" In the definition of a class or class template, if a base class depends on a template-parameter, the base class</div><div>scope is not examined during unqualified name lookup either at the point of definition of the class template</div>


<div>or member or during an instantiation of the class template or member"</div><div><br></div><div><br></div></span></div></div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Tue, Dec 14, 2010 at 23:05, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">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>On Dec 14, 2010, at 2:01 PM, John McCall wrote:<br>
> On Dec 14, 2010, at 1:33 PM, Adrien Chauve wrote:<br>
>> 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.<br>



><br>
> Well, no, they can't.  This is what we're all trying to explain.  The standard is extremely explicit about this:<br>
><br>
> C++ [temp.dep.res]p1:<br>
>  In resolving dependent names, names from the following sources are considered:<br>
>  — Declarations that are visible at the point of definition of the template.<br>
>  — Declarations from namespaces associated with the types of the function arguments both from the instantiation context and from the definition context.<br>
<br>
</div>This is actually not the part of the standard I meant to quote, although it does apply.  The better quote is [temp.dep.candidate]p1:<br>
<br>
  For a function call that depends on a template parameter, the candidate functions are found using the usual lookup rules except that:<br>
  — For the part of the lookup using unqualified name lookup or qualified name lookup, only function declarations from the template definition context are found.<br>
  — For the part of the lookup using associated namespaces, only function declarations found in either the template definition context or the template instantiation context are found.<br>
<font color="#888888"><br>
John.</font></blockquote></div><br></div>
</div></div></blockquote></div><br></div>