On Wednesday, 16 July 2014 at 13:04:37 UTC, Johannes Pfau wrote:
I experimented a little more with Volatile!T and I don't think
you can make this example work:
struct Timer
{
uint control;
uint data;
}
enum timerA = (Volatile!Timer)* = cast()0xDEADBEAF;
timerA.control |= 0b1;
How about
struct VolatileTimer
{
Volatile!uint control;
Volatile!uint data;
}
enum timerA = cast(VolatileTimer*)0xDEADBEAF;
timerA.control |= 0b1;
