*
(Shekhar) schriebt:
> template<typename T> struct A{}; //line 1
> template<typename T> struct B{}; //line 2
> template<typename T> struct B<A<T> > {}; //line 3: partial
> specialization of B
>
> VC6.0 compiler results for the above:
> at line 3:
>
> error C2989: 'B<struct A<T> >' : template class has already been
> defined as a non-template class
> error C2988: unrecognizable template declaration/definition
>
> Is there anyway to achieve the above without using partial
> specialization of templates
Not in general, but there are tricks for special cases, essentially
replacing partial specialization by nested full specialization. Which
depends on the usage context. I suggest looking in the source code for
the VC 6.0 port of the Loki library.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?