Order of static this() execution?

drathier forum.dlang.org at fi.fo
Sun Feb 23 11:57:37 UTC 2020


Well, like this, rather:
```
template none(msg) {
	T!(msg)  none;
	static this() {
		logInfo("static this 4 cmd none [template:%s]", typeid(msg));
		none = ((std.functional.toDelegate(&batch!(msg)
)))(X!(T!(msg) ));
		logInfo("static this 4 cmd none [template:%s] done", 
typeid(msg));
	}
}
```



More information about the Digitalmars-d-learn mailing list