Stuart Redmann wrote:
Quote:
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.
Wow... What do you say to that, eh?
Do you leave your house at all or are you afraid you will be hit with
a bus? How do you code at all? You must be afraid that whatever you
write has a bug or two in it... Or does the code you write work the
first time and always?
Quote:
One of the "features" of MS
VC6.0 is the following:
template<class A, class B = A::Type>
Change this to
template<class A, class B = typename A::Type>
But I am not sure your outdated and non-standard VC++ is going to
accept that (and I don't have any way to check).
Quote:
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?
Write standard C++.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask