comparison compile/c/creal_37_B.d @ 1247:d75d907a68bb

[Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments Sean Kelly <sean@f4.ca> 2006-11-27 news:bug-614-3@http.d.puremagic.com/issues/
author thomask
date Wed, 29 Nov 2006 21:20:30 +0000
parents
children daef239f37cf
comparison
equal deleted inserted replaced
1246:eb667a69ce7a 1247:d75d907a68bb
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Sean Kelly <sean@f4.ca>
6 // @date@ 2006-11-27
7 // @uri@ news:bug-614-3@http.d.puremagic.com/issues/
8 // @desc@ [Issue 614] New: Real and imaginary properties of complex numbers not allowed as template arguments
9
10 module dstress.compile.c.creal_37_B;
11
12 const creal a = 1.0L + 2.0Li;
13
14 template getRealPart(creal x){
15 const real getRealPart = x.re;
16 }
17
18 static assert(getRealPart!(a) == 1.0L);
19
20
21 template getImaginaryPart(creal x){
22 const real getImanginaryPart = x.im;
23 }
24
25 static assert(getImaginaryPart!(a) == 2.0L);