Re: Syntax of isExpression

2017-01-31 Thread Alex via Digitalmars-d-learn
On Tuesday, 31 January 2017 at 11:40:06 UTC, Ali Çehreli wrote: On 01/31/2017 02:49 AM, Alex wrote: > auto r = E!(int, myType.a, true)(); > static if (is(T : TX!TL, alias TX, TL...)) > { > writeln(is(TL[0] == int)); > writeln(typeid(TL[1])); > writeln(typeid(

Re: Syntax of isExpression

2017-01-31 Thread Ali Çehreli via Digitalmars-d-learn
On 01/31/2017 02:49 AM, Alex wrote: > auto r = E!(int, myType.a, true)(); > static if (is(T : TX!TL, alias TX, TL...)) > { > writeln(is(TL[0] == int)); > writeln(typeid(TL[1])); > writeln(typeid(TL[2])); > writeln(is(TL[2] == bool)); > } That's be

Syntax of isExpression

2017-01-31 Thread Alex via Digitalmars-d-learn
Hey guys, could you help me understand the syntax of the isExpression? I have an example, leaned on documentation https://dlang.org/spec/expression.html#IsExpression case 7. // Code starts here // import std.stdio, std.typecons; alias Tup = Tuple!(int, string, bool); enum myType {a, b, c} st