Thanks for the link, it's exactly what I was searching for.<div><br></div><div>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).</div>

<div><br></div><div>What am I missing?</div><div><br></div><div>Cheers,</div><div>Adrien</div><div><br><br><div class="gmail_quote">On Fri, Dec 3, 2010 at 21:59, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Fri, Dec 3, 2010 at 12:52 PM, Adrien Chauve <<a href="mailto:adrien.chauve@gmail.com">adrien.chauve@gmail.com</a>> wrote:<br>


> Hi,<br>
> I'm trying to compile a C++ project using clang and I'm getting some errors.<br>
> I've reduced my problem to the following code lines:<br>
><br>
> template<typename T><br>
> struct Base<br>
> {<br>
>     void foo(int) {}<br>
> };<br>
> template<typename T><br>
> struct Derived :  Base<T><br>
> {<br>
>     void bar()<br>
>     {<br>
>         this->foo(2);<br>
>     }<br>
>     void foobar()<br>
>     {<br>
>         T c;<br>
>         foo(c);<br>
>     }<br>
> };<br>
> int main()<br>
> {<br>
>     Derived<int> x;<br>
>     x.bar();                  //< OK<br>
>     x.foobar();             //< ERROR<br>
> }<br>
><br>
> I get the following error:<br>
><br>
> /home/achauve/dev/c++/test_clang/test_clang.cpp:18:9: error: use of<br>
> undeclared identifier 'foo'<br>
>         foo(c);<br>
>         ^<br>
>         this-><br>
> /home/achauve/dev/c++/test_clang/test_clang.cpp:26:7: note: in instantiation<br>
> of member function<br>
>       'Derived<int>::foobar' requested here<br>
>     x.foobar();<br>
>       ^<br>
> /home/achauve/dev/c++/test_clang/test_clang.cpp:4:10: note: must qualify<br>
> identifier to find this declaration in<br>
>       dependent base class<br>
>     void foo(int) {}<br>
>          ^<br>
><br>
> In the case of foobar with a dependant template-parameter, shouldn't the<br>
> identifier be found anyway? (gcc doesn't complain).<br>
<br>
</div></div>See <a href="http://clang.llvm.org/compatibility.html#dep_lookup_bases" target="_blank">http://clang.llvm.org/compatibility.html#dep_lookup_bases</a> .  If<br>
you have any questions after reading that, feel free to ask.<br>
<font color="#888888"><br>
-Eli<br>
</font></blockquote></div><br></div>