Am Tue, 15 Jul 2014 18:13:26 +0000
schrieb "Meta" <[email protected]>:
> >
> > Also some things will just not work with Volatile!T, for example
> > volatile/nonvolatile member function overloading.
>
> Functions can take Volatile!T, of course, and you can always have
> "set/volatileSet". You might even be able to use opDispatch to
> make it less DRY.
No, this doesn't work with Volatile!:
struct A
{
private int _val;
int read(){ return val+val };
int read() volatile { auto tmp = val; return tmp*tmp; };
}
opDispatch sounds _awesome_ for systems with a few KB of SRAM. People
here always have nice ideas but will you implement it and tune it until
it has as little overhead as the C version?