Type tuple pointers

2015-05-21 Thread Freddy via Digitalmars-d
Why don't pointers and .sizeof work with typetuples import std.typetuple; void main(){ TypeTuple!(int,char)* test; TypeTuple!(long,int).sizeof; } $ rdmd test test.d(3): Error: can't have pointer to (int, char) test.d(4): Error: no property 'sizeof' for tuple '(long, int)'

Re: Type tuple pointers

2015-05-21 Thread Meta via Digitalmars-d
On Thursday, 21 May 2015 at 16:11:30 UTC, Timon Gehr wrote: On 05/21/2015 05:37 PM, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you are wrong on this one - this is

Re: Type tuple pointers

2015-05-21 Thread Timon Gehr via Digitalmars-d
On 05/21/2015 09:36 PM, Meta wrote: On Thursday, 21 May 2015 at 16:11:30 UTC, Timon Gehr wrote: On 05/21/2015 05:37 PM, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you

Re: Type tuple pointers

2015-05-21 Thread Alex Parrill via Digitalmars-d
On Thursday, 21 May 2015 at 14:55:21 UTC, Freddy wrote: Why don't pointers and .sizeof work with typetuples import std.typetuple; void main(){ TypeTuple!(int,char)* test; TypeTuple!(long,int).sizeof; } $ rdmd test test.d(3): Error: can't have pointer to (int, char) test.d(4):

Re: Type tuple pointers

2015-05-21 Thread Dicebot via Digitalmars-d
On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you are wrong on this one - this is actually a valid variable declaration which will create two distinct local variables and uses their

Re: Type tuple pointers

2015-05-21 Thread Alex Parrill via Digitalmars-d
On Thursday, 21 May 2015 at 15:37:42 UTC, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you are wrong on this one - this is actually a valid variable declaration which will

Re: Type tuple pointers

2015-05-21 Thread Timon Gehr via Digitalmars-d
On 05/21/2015 06:14 PM, Timon Gehr wrote: On 05/21/2015 06:05 PM, Alex Parrill wrote: On Thursday, 21 May 2015 at 15:37:42 UTC, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense.

Re: Type tuple pointers

2015-05-21 Thread Timon Gehr via Digitalmars-d
On 05/21/2015 05:37 PM, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you are wrong on this one - this is actually a valid variable declaration which will create two distinct

Re: Type tuple pointers

2015-05-21 Thread Timon Gehr via Digitalmars-d
On 05/21/2015 06:05 PM, Alex Parrill wrote: On Thursday, 21 May 2015 at 15:37:42 UTC, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you are wrong on this one - this is

Re: Type tuple pointers

2015-05-21 Thread John Colvin via Digitalmars-d
On Thursday, 21 May 2015 at 16:11:30 UTC, Timon Gehr wrote: On 05/21/2015 05:37 PM, Dicebot wrote: On Thursday, 21 May 2015 at 15:30:59 UTC, Alex Parrill wrote: They aren't types themselves, so `TypeTuple!(int, char) var` doesn't make sense. Sadly, you are wrong on this one - this is