Hi!
When I was trying to compile my code with VC++ 7.1, it gave some errors
that might indicate that CW is a little too forgiving for incorrect syntax
of template specialization. So I wonder if that's the case, or not:
-----------------------------------------
template<typename T>
struct A {};
template<>
struct A<int> { void f(); };
template<> // (1)
void A<int>::f() {}
-----------------------------------------
Here, the template A is specialized for T==int, and then a definition of
A<int>::f() is given. As A<int> isn't a template, but rather a normal class,
the "template<>" at (1) should give an error. VC++ 7.1 and Comeau both think
so, while CodeWarrior allows either variant, with specialization syntax or
without it.
- WBR, Alexey Proskuryakov
MW Ron - 24 Feb 2004 17:49 GMT
>Hi!
>
[quoted text clipped - 18 lines]
>so, while CodeWarrior allows either variant, with specialization syntax or
>without it.
I'll check with our C++ engineer and submit this as a possible bug.
Thanks for bringing this to our attention.
Ron

Signature
Announcing CodeWarrior Development Tools for Windows v9.2
http://www.metrowerks.com/MW/Develop/Desktop/Windows/Professional/Default.htm
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>