Questions about initialization of array of objects
    Andrey 
    andr-sar at yandex.ru
       
    Sat Jan 12 17:11:14 PST 2013
    
    
  
Could be even simpler. But I do not know about additional 
overhead. How do you feel on this?
abstract class _MyClass {
     static string str = "Hello!";
     static void myfun() {
	writeln(str);
     }
}
class MyClass(T) : _MyClass {
	this() {
             this.myfun();
	}
}
P.S.: sorry if I don't understand your vision about this problem 
correctly. I've never been doing template programming much.
    
    
More information about the Digitalmars-d-learn
mailing list