Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
January 23, 2006 DMD 0.144 release | ||||
---|---|---|---|---|
| ||||
Lots of improvements for templates per Don Clugston's suggestions. http://www.digitalmars.com/d/changelog.html |
January 23, 2006 Re: DMD 0.144 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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.
|
January 23, 2006 Re: DMD 0.144 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | 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. |
January 23, 2006 Re: DMD 0.144 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to tyro[a.c.edwards] | Now imagine how stupid I felt after reading your post again.... Please ignore my insignificant babble. Thanks, Andrew |
January 25, 2006 Re: DMD 0.144 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston Attachments: | 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 |
Copyright © 1999-2021 by the D Language Foundation