On Fri, 12 Jun 2015 17:28:56 -0700, Ali Çehreli wrote:

>>> void main()
>>> {
>>>       static assert(is (ReturnType!(() => foo(long.init)) == int));
>>>       static assert(is (ReturnType!(() => foo(byte.init)) == short));
>>> }
>>>
>>> Ali
>>
>> or without importing `std.traits`:
>>
>>    static assert(is(typeof(foo(long.init)) == int)); static
>>    assert(is(typeof(foo(byte.init)) == short));
>>
>>
> Good point. :) What is the difference of ReturnType then?

i don't know. it looks nicer, maybe. ;-)

Attachment: signature.asc
Description: PGP signature

Reply via email to