Template class with dispatched properties

bearophile bearophileHUGS at lycos.com
Fri Nov 8 00:22:58 PST 2013


Chris Cain:

> One tiny place of improvement for your code, however, is if you 
> changed it to `static immutable offset = ...;` because that 
> helps the compiler know to do that operation at compile time.

The idiomatic way to do that is to use "enum offset = ...;".

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list