annotate compile/c/cdouble_12_A.d @ 1320:daef239f37cf

sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author thomask
date Sun, 31 Dec 2006 19:59:08 +0000
parents d75d907a68bb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1247
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
1 // $HeadURL$
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
2 // $Date$
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
3 // $Author$
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
4
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
5 // @author@ Sean Kelly <sean@f4.ca>
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
6 // @date@ 2006-11-27
1320
daef239f37cf sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents: 1247
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=614
1247
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
8 // @desc@ [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
9
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
10 module dstress.compile.c.cdouble_12_A;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
11
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
12 const cdouble a = 1.0 + 2.0i;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
13
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
14 const double b = a.re;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
15 static assert(b == 1.0);
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
16
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
17 const double c = a.im;
d75d907a68bb [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
thomask
parents:
diff changeset
18 static assert(c == 2.0);