foo => "bar" key/value literals in D!

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed May 25 09:45:09 PDT 2016


On 2016-05-25 13:57, Daniel N wrote:

> Issue9608 is good too, but insufficient.
>
> import std.traits;
> static assert(__traits(isTemplate, a => 0));
> static assert(!__traits(isTemplate, (int a) => 0));
>
> The 2nd case can't be solved by 9608 since it's about introspecting
> templates and "(int a) => 0)" is no template.

Hmm, I though the second case was already possible, but I see now that 
it isn't.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list