Compare TypeTuple element with another type

2014-08-01 Thread Tudor Berariu via Digitalmars-d
Is it possible to compare at compile time an element from a TypeTuple with another type? This code fails: alias T = Tuple!(int, bool); static assert(is(T[0] == int)); Error: static assert (is(Tuple!(int, bool)[0] == int)) is false Tudor

Re: Compare TypeTuple element with another type

2014-08-01 Thread Rene Zwanenburg via Digitalmars-d
On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time an element from a TypeTuple with another type? This code fails: alias T = Tuple!(int, bool); static assert(is(T[0] == int)); Error: static assert (is(Tuple!(int, bool)[0] ==

Re: Compare TypeTuple element with another type

2014-08-01 Thread John Colvin via Digitalmars-d
On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time an element from a TypeTuple with another type? This code fails: alias T = Tuple!(int, bool); static assert(is(T[0] == int)); Error: static assert (is(Tuple!(int, bool)[0] ==

Re: Compare TypeTuple element with another type

2014-08-01 Thread Tudor Berariu via Digitalmars-d
On Friday, 1 August 2014 at 10:34:02 UTC, Rene Zwanenburg wrote: On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time an element from a TypeTuple with another type? This code fails: alias T = Tuple!(int, bool); static assert(is(T[0] ==

Re: Compare TypeTuple element with another type

2014-08-01 Thread Tudor Berariu via Digitalmars-d
On Friday, 1 August 2014 at 11:39:27 UTC, John Colvin wrote: On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time an element from a TypeTuple with another type? This code fails: alias T = Tuple!(int, bool); static assert(is(T[0] == int

Re: Compare TypeTuple element with another type

2014-08-01 Thread John Colvin via Digitalmars-d
On Friday, 1 August 2014 at 11:55:02 UTC, Tudor Berariu wrote: On Friday, 1 August 2014 at 10:34:02 UTC, Rene Zwanenburg wrote: On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time an element from a TypeTuple with another type? This code fai

Re: Compare TypeTuple element with another type

2014-08-01 Thread John Colvin via Digitalmars-d
On Friday, 1 August 2014 at 12:08:23 UTC, John Colvin wrote: On Friday, 1 August 2014 at 11:55:02 UTC, Tudor Berariu wrote: On Friday, 1 August 2014 at 10:34:02 UTC, Rene Zwanenburg wrote: On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time a

Re: Compare TypeTuple element with another type

2014-08-01 Thread Rene Zwanenburg via Digitalmars-d
On Friday, 1 August 2014 at 11:55:02 UTC, Tudor Berariu wrote: On Friday, 1 August 2014 at 10:34:02 UTC, Rene Zwanenburg wrote: On Friday, 1 August 2014 at 10:25:39 UTC, Tudor Berariu wrote: Is it possible to compare at compile time an element from a TypeTuple with another type? This code fai