www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 0.144 release

reply "Walter Bright" <newshound digitalmars.com> writes:
Lots of improvements for templates per Don Clugston's suggestions.

http://www.digitalmars.com/d/changelog.html
Jan 23 2006
parent reply Don Clugston <dac nospam.com.au> writes:
Walter Bright wrote:
 Lots of improvements for templates per Don Clugston's suggestions.
 
 http://www.digitalmars.com/d/changelog.html
<gasp> Wasn't expecting so much, so soon... Awesome! A couple of minor bugs: * The == constant folding doesn't work inside static assert. eg ------------------ static assert("abc" == "abc"); ------------------ a.d(1): Integer constant expression expected instead of "abc" a.d(1): Integer constant expression expected instead of "abc" * the next example produces _unexpected_ results: ------------------ template eagle() { const int eagle = 3; } template hawk(int n) { const int hawk = 2; } const int birdofprey = hawk!(.eagle!()); ------------------ ... it prints " template instance id" at compile time! Looks like a debug message got left in :-) Doesn't happen if you remove the dot.
Jan 23 2006
next sibling parent reply tyro[a.c.edwards] <tyro[a.c.edwards]_member pathlink.com> writes:
In article <dr2ia9$24de$1 digitaldaemon.com>, Don Clugston says...
Walter Bright wrote:
 Lots of improvements for templates per Don Clugston's suggestions.
 
 http://www.digitalmars.com/d/changelog.html
<gasp> Wasn't expecting so much, so soon... Awesome! A couple of minor bugs: * The == constant folding doesn't work inside static assert. eg ------------------ static assert("abc" == "abc"); ------------------ a.d(1): Integer constant expression expected instead of "abc" a.d(1): Integer constant expression expected instead of "abc" * the next example produces _unexpected_ results: ------------------ template eagle() { const int eagle = 3; } template hawk(int n) { const int hawk = 2; } const int birdofprey = hawk!(.eagle!()); ------------------ ... it prints " template instance id" at compile time!
Admittedly this is not a very intuitive error message (and it does deserve some attention) but the reason for this is that the ¡È.¡É operator is no longer required for ¡Èrecursive template instantiations¡É. So instead of: const int birdofprey = hawk!(.eagle!()); try const int birdofprey = hawk!(eagle!()); instead!
Looks like a debug message got left in :-)
Doesn't happen if you remove the dot.
Jan 23 2006
parent tyro[a.c.edwards] <tyro[a.c.edwards]_member pathlink.com> writes:
Now imagine how stupid I felt after reading your post again....
Please ignore my insignificant babble.

Thanks,
Andrew
Jan 23 2006
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Don Clugston schrieb am 2006-01-23:
 Walter Bright wrote:
 Lots of improvements for templates per Don Clugston's suggestions.
 
 http://www.digitalmars.com/d/changelog.html
<gasp> Wasn't expecting so much, so soon... Awesome! A couple of minor bugs: * The == constant folding doesn't work inside static assert. eg ------------------ static assert("abc" == "abc"); ------------------ a.d(1): Integer constant expression expected instead of "abc" a.d(1): Integer constant expression expected instead of "abc"
Added to DStress as http://dstress.kuehne.cn/run/o/opEquals_04_A.d http://dstress.kuehne.cn/run/o/opEquals_04_B.d http://dstress.kuehne.cn/run/o/opEquals_04_C.d http://dstress.kuehne.cn/run/o/opEquals_04_D.d http://dstress.kuehne.cn/run/o/opEquals_04_E.d http://dstress.kuehne.cn/run/o/opEquals_04_F.d http://dstress.kuehne.cn/run/o/opEquals_04_G.d http://dstress.kuehne.cn/run/o/opEquals_04_H.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFD1yoC3w+/yD4P9tIRArqBAKCTS2aYPpKL8DdXC2KAc0q3ExEkTgCgokep 7zfhiiQIEb6BEK+/i0lWKQc= =Xzpi -----END PGP SIGNATURE-----
Jan 25 2006