On Wednesday, 16 July 2014 at 13:51:49 UTC, Kagamin wrote:
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;
The actual code is a little different:
http://forum.dlang.org/thread/[email protected]?page=5#post-fkgjcnqyoqltftbfmwqd:40forum.dlang.org
I think, the idea behind such declarations is to not let user to
set volatile qualifiers. What if he forgets?