S
Stuart Redmann
Hello newsgroup,
please don't flame me: I use the very old and very non-conformant MS VC6.0
compiler. Though I'd like to upgrade to a better compiler, I'm afraid that some
of my code will break. One of the "features" of MS VC6.0 is the following:
template<class A, class B = A::Type>
class C
{
};
class D
{
public:
typedef D Type;
};
int main ()
{
D d;
}
This compiles fine under VC, and does what I expect it to do (in my real
application, not this down-cut sample). I tried to compile it with Comeau
online, and surprise, surprise, it gives an error:
"ComeauTest.c", line 1: error: nontype "A::Type" is not a type name
template<class A, class B = A::Type>
^
What do I have to do to make the code work under Comeau?
Thanks,
Stuart
please don't flame me: I use the very old and very non-conformant MS VC6.0
compiler. Though I'd like to upgrade to a better compiler, I'm afraid that some
of my code will break. One of the "features" of MS VC6.0 is the following:
template<class A, class B = A::Type>
class C
{
};
class D
{
public:
typedef D Type;
};
int main ()
{
D d;
}
This compiles fine under VC, and does what I expect it to do (in my real
application, not this down-cut sample). I tried to compile it with Comeau
online, and surprise, surprise, it gives an error:
"ComeauTest.c", line 1: error: nontype "A::Type" is not a type name
template<class A, class B = A::Type>
^
What do I have to do to make the code work under Comeau?
Thanks,
Stuart