DMD 2.064 changelog typo?
Iain Buclaw
ibuclaw at ubuntu.com
Tue Oct 29 07:15:08 PDT 2013
On 29 October 2013 12:13, Rene Zwanenburg <renezwanenburg at gmail.com> wrote:
> On Tuesday, 29 October 2013 at 10:26:13 UTC, Jacob Carlborg wrote:
>>
>> On 2013-10-29 10:43, Andrea Fontana wrote:
>>>
>>> I was reading 2.064 changelog on website.
>>> Check this:
>>>
>>> template Tuple(T...) { alias Tuple = T; }
>>>
>>> template isIntOrFloat(T)
>>> {
>>> static if (is(T == int) || is(T == float))
>>> enum isIntOrFloat = true;
>>> else
>>> enum isIntOrFloat = true;
>>> }
>>>
>>> I guess the "else" branch should be " = false" rather than " = true";
>>>
>>
>> Or just:
>>
>> template isIntOrFloat(T)
>> {
>> enum isIntOrFloat = is(T == int) || is(T == float)
>> }
>
>
> Didn't we get the shorthand enum template syntax in this release?
>
> enum isInOrFloat(T) = is(T == int) || is(T == float)
In 2.063? No we didn't.
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';
More information about the Digitalmars-d
mailing list