How to add n items to TypeTuple?

2012-11-01 Thread denizzzka
For example, adding 3 strings to type tuple t: foreach( i; 0..2 ) alias TypeTuple!( t, string ) t; // this is wrong code and result should be: TypeTuple!( string, string, string );

Re: How to add n items to TypeTuple?

2012-11-01 Thread Justin Whear
On Thu, 01 Nov 2012 19:42:07 +0100, denizzzka wrote: For example, adding 3 strings to type tuple t: foreach( i; 0..2 ) alias TypeTuple!( t, string ) t; // this is wrong code and result should be: TypeTuple!( string, string, string ); Use a recursive template. Here's one that

Re: How to add n items to TypeTuple?

2012-11-01 Thread Simen Kjaeraas
On 2012-11-01, 19:52, Justin Whear wrote: On Thu, 01 Nov 2012 19:42:07 +0100, denizzzka wrote: For example, adding 3 strings to type tuple t: foreach( i; 0..2 ) alias TypeTuple!( t, string ) t; // this is wrong code and result should be: TypeTuple!( string, string, string ); Use a

Re: How to add n items to TypeTuple?

2012-11-01 Thread denizzzka
Great! Thanks!