This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Loki's tricky templates


At 22:47 22/4/01 +0200, Paolo Carlini wrote:

>A courtesy: would you please mind having a quick look at (thereafter I 
>will move
>to other non-compile spots in Loki):
>
>     http://gcc.gnu.org/ml/gcc/2001-04/msg01019.html

Sure, the code is illegal.  According to the standard, in section 14.3.1 
paragraph 2:
     A local type, a type with no linkage, an unnamed type or a type compounded
     from any of these types shall not be used as a template-argument for a 
template
     type-parameter.
So template argument deduction for SetLongevity function call fails.

--Kriang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]