On 2/24/13, Steven Schveighoffer <[email protected]> wrote: > You could create a base class for all: > > class TestBase > { > private: // or protected? > __gshared TestBase[] globalInstances; > ... // same as what you have > } > > class TestClass(T) : TestBase > { > ... > }
Ah that's much better than my solution, cool. Mine was extracted from this enhancement request: http://d.puremagic.com/issues/show_bug.cgi?id=9088
