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.
>
> No, it might not, since default arguments are never used as part of
> template argument deduction, ...

OK, you are right :-)
I've checked the spec: 14.6.2 "... In an expression of the form:
postfix-expression ( expression-listopt )
where the postfix-expression is an identifier, the identifier denotes a
dependent name if and only if any of the expressions in the expression-list
is a type-dependent expression ..."
--
Vladimir Nesterovsky
e-mail: vladimir@xxxxxxxxxxxxxxxxxxxx
home: http://www.nesterovsky-bros.com


.