volatile struct definition for peripheral control registers

Ali Çehreli acehreli at yahoo.com
Mon Dec 2 19:30:06 UTC 2024


On 12/2/24 11:10 AM, Josh Holtrop wrote:

 > This works but requires that ugly .get call rather than just accessing
 > it directly.

'alias this' may help:

   https://dlang.org/spec/struct.html#alias-this

All you need to do is to add the following line to the Volatile template:

   alias get this;

Ali



More information about the Digitalmars-d-learn mailing list