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: egcs support for local classes as template arguments


Don Waugaman <dpw@cs.arizona.edu> writes:
> 
> The workaround is obvious - move the class definition outside the function -
> and it works, but I was wondering if the use of local classes as template
> arguments would be fixed any time soon.

How about never ;-) This is illegal code, so will never be "fixed". I
had to convert some old code where I made the same mistake and didn't
realize it until the newer compilers started rejecting it. See DWP sec
14.8 "Template Arguments" for the rules; for a discussion, dig out the 
thread in comp.std.c++ (using http://www.dejanews.com) about 2 years ago 
titled "local type not allowed as template arg" (specifically look for 
the explanation by Steve Clamage).

Mumit


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