egcs/g++ Compiler error when using :: at start of template parameter name

Smithers, Kit
Tue Apr 20 09:53:00 GMT 1999

The attached files illustrate a compiler error when using a :: at the start
of a template parameter:

	typedef MyClass<::String> MyStringClass2;

The code can be made to compile by inserting a space between the < and the
:: as in:

	typedef MyClass< ::String> MyStringClass2;

I'm informed that the problem also occurs in egcs1.1.2 although I have only
personally tried egcs1.1.1

Is this a known problem and/or is there a patch available for it.
Or even better is the version without a space "non-standard".

 <<bad.cxx>>  <<bad.ii>>  <<bad.s>>  <<output.log>> 

Many thanks...

Kit Smithers

More information about the Gcc-bugs mailing list