Mercurial > projects > dstress
view run/v/volatile_02_A.d @ 1560:36bedfa079e6
D1 -> D2 : 2/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:15:01 +0000 |
parents | 20d8ee6523e1 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2005-12-02 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5726 module dstress.run.v.volatile_02_A; template atomicLoad( T ){ T atomicLoad( ref T val ){ volatile{ return val; } } } int main(){ int i; uint u; atomicLoad!(int)(i); atomicLoad!(uint)(u); return 0; }