egcs support for local classes as template arguments
Mumit Khan
khan@xraylith.wisc.edu
Wed Dec 17 13:50:00 GMT 1997
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
More information about the Gcc
mailing list