Hi,
For this
template< typename T >
struct X {
void f(X) {}
};
template< typename T >
struct Y : public X<Y>{
void f(Y) {}
};
int main()
{
Y<int> y;
return 0;
}
code, which VC7.1 accepts, Comeau says
"ComeauTest .c", line 7: error: argument list for class template "Y" is missing
struct Y : public X<Y>{
^
and CW9 doesn't like it either.
I'm pretty sure 'Y' can be used in place of
'Y<T>' only after the opening { -- However,
while I'm sure the standard specifies this
somewhere, everytime I look into this I feel
like I can't read...
So I suspect this is a bug VC7.1.
Schobi
P.S.: Now, let me guess... OK... according to
how this usually goes, Carl will pick it
up, check it against Whidbey (sorry, but
I don't have a spare machine and it blew
my VC7.1 installation when I tried side-
by-side with VC7.1), and say either that
this is fixed in Whidbey, or that he will
report it (TIA!), although there is not
much hope that it will be fixed too soon
because accepting illegal code doesn't
get a very high priority...
Am I right? :)
--
Sp******@gmx.de is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers