D compile time algorithms implementation

Timon Gehr timon.gehr at gmx.ch
Wed Apr 24 13:29:38 PDT 2013


On 04/24/2013 10:28 PM, Timon Gehr wrote:
> On 04/24/2013 09:28 PM, David Nadlinger wrote:
>> On Wednesday, 24 April 2013 at 08:46:03 UTC, khurshid wrote:
>>> Is this code right?
>>>
>>>
>>> template templateAnd(Preds...)
>>> { … }
>>
>> No. templateAnd/templateOr are documented to perform short-circuit
>> evaluation of the operands.
>>
>> David
>
> I think that is what the implementation intends to do. I am more worried
> about the expressions reading similar to:
>
> .templateAnd(Preds[0..$/2])
>
> The code appears to be entirely untested.

(Also, the lookup rules have been changed for function calls and 
template instantiations on eponymous template symbols, and therefore the 
'.' prefix is not needed anymore.)


More information about the Digitalmars-d mailing list