
On 22/06/07, Seweryn Habdank-Wojewódzki <shw@agh.edu.pl> wrote:
So I am looking for the example where e.g. topological sorting of symbols can destroy functionality. The example above is no that case.
But this code is an example of the bad design. So am looking the code where design is good, and any sorting of symbols will change functionality.
What about using a template class with a partial specialization that is defined afterwards? 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). Regards, Peter