Another try E)------------------------------------------- struct StaticRegister { static private uint _value; @property static uint value() { return _value; } @property static void value(uint v) { _value = v; } static uint opCall(){return _value;} alias _value this; }
void main(string[] s) { StaticRegister = 1; assert(StaticRegister()==1); }Yes you're right, it's a bit strange that the writer works...does the expression 'static this' make sense ?!