The problem with the value that is returned from the condition in `static if`. Bug or feature?
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 6 13:59:27 PDT 2015
On Saturday, 6 June 2015 at 18:16:28 UTC, sigod wrote:
> On Saturday, 6 June 2015 at 17:06:37 UTC, Dennis Ritchie wrote:
>> Pulls whether this issue? Or is it normal?
>
> http://dlang.org/version.html#staticif:
>
>> StaticIfCondition:
>> static if ( AssignExpression )
>>
>> AssignExpression is implicitly converted to a boolean type,
>> and is evaluated at compile time. The condition is satisfied
>> if it evaluates to true. It is not satisfied if it evaluates
>> to false.
>
> So, I suppose it's should work without casting to bool or `!is`
> operator.
I reported this:
https://issues.dlang.org/show_bug.cgi?id=14659
More information about the Digitalmars-d-learn
mailing list