Re: function templates are not being compiled !
- From: "Vladimir Nesterovsky" <vladimir@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 16:49:33 +0200
>>>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
.
- References:
- function templates are not being compiled !
- From: Alfonso Morra
- Re: function templates are not being compiled !
- From: Tom Widmer [VC++ MVP]
- Re: function templates are not being compiled !
- From: Vladimir Nesterovsky
- Re: function templates are not being compiled !
- From: Tom Widmer [VC++ MVP]
- function templates are not being compiled !
- Prev by Date: Re: Telnet
- Next by Date: Re: Forward declaration of C# types in managed C++ headers
- Previous by thread: Re: function templates are not being compiled !
- Next by thread: Command line arguments
- Index(es):