Re: function templates are not being compiled !



> template <class T>
> void f()
> {
> g();
> }
>
> int main()
> {
> }
>
> That code is ill-formed, since there is no g() visible, but it is up to
> the compiler whether it diagnoses the error or not.

Tom,

"g()" might be a call to a "void g(T t = T());" and therefore it's template
dependant.
--
Vladimir Nesterovsky
e-mail: vladimir@xxxxxxxxxxxxxxxxxxxx
home: www.nesterovsky-bros.com



.



Relevant Pages


Loading