Re: Template recursion error on table struct

2016-03-26 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 26 March 2016 at 09:47:10 UTC, Ali Çehreli wrote: Please ignore my earlier response. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > template ColumnTable(T...){ [...] > auto output = ColumnTable!(new_data)(new_data); // This is the > problem You want to slice the

Re: Template recursion error on table struct

2016-03-26 Thread Ali Çehreli via Digitalmars-d-learn
Please ignore my earlier response. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > template ColumnTable(T...){ [...] > auto output = ColumnTable!(new_data)(new_data); // This is the > problem You want to slice the template arguments there. The following removes the infinite

Re: Template recursion error on table struct

2016-03-26 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 26 March 2016 at 06:28:42 UTC, Ali Çehreli wrote: Likewise, that instantiation of ColumnTable is with the symbols 'names', 'salary', and 'age'. Is that what you want? Or do you want to instantiate with their types? Can you explain some more what you are trying to do. Ali I

Re: Template recursion error on table struct

2016-03-26 Thread data pulverizer via Digitalmars-d-learn
On Saturday, 26 March 2016 at 06:28:42 UTC, Ali Çehreli wrote: WARNING: Do not try to compile this code. Your computer may be unresponsive for a while. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > I am attempting to create a table struct with generic column types using > templates.

Re: Template recursion error on table struct

2016-03-26 Thread Ali Çehreli via Digitalmars-d-learn
WARNING: Do not try to compile this code. Your computer may be unresponsive for a while. :) On 03/25/2016 02:54 PM, data pulverizer wrote: > I am attempting to create a table struct with generic column types using > templates. However, the template arguments are not types; rather, aliases. >

Re: Template recursion error on table struct

2016-03-25 Thread data pulverizer via Digitalmars-d-learn
p.s. I realise that the ColumnTable call is a little ponderous but I tidy it up in a convenience wrapper function: auto CreateDataTable(Args...)(){ string[] names; foreach(i, arg; Args){ names ~= Args[i].stringof; } auto df =

Template recursion error on table struct

2016-03-25 Thread data pulverizer via Digitalmars-d-learn
I am attempting to create a table struct with generic column types using templates. The subTable() member function subsets the table, however I am getting a template recursion error. I know where the problem is from, I don't know how to resolve it. I am modelling it after the matrix example in