
Hi Peter Peter Bindels wrote:
On 22/06/07, Seweryn Habdank-Wojewódzki <shw@agh.edu.pl> wrote: What about using a template class with a partial specialization that is defined afterwards?
Seems to be good idea.
template <class A> class T { A a; };
int func() { return sizeof(T<void *>); }
template <class A> class T<A *> { A *a[10]; };
I think that all uses that change the meaning of any symbol after it's defined is bad design or bad implementation. If you were to change the ordering inherently, you'd have to give very explicit warnings or errors on these kinds of situations (in particular, typedefs and partial specializations).
Yes, this example is really good. Thanks a lot for it. Best regards. -- |\/\/| Seweryn Habdank-Wojewódzki \/\/