dynamic get from variantArray() data table

2015-10-13 Thread data pulverizer via Digitalmars-d-learn
Hi, I am trying to use variantArray() as a data table object to hold columns each of which is an array of a specific type. I need to be able to get values from data table but I am having problems ... import std.stdio; // i/o import std.variant; // type variations void main(){ // Columns

Re: dynamic get from variantArray() data table

2015-10-13 Thread Alex Parrill via Digitalmars-d-learn
On Tuesday, 13 October 2015 at 15:17:15 UTC, data pulverizer wrote: Hi, I am trying to use variantArray() as a data table object to hold columns each of which is an array of a specific type. I need to be able to get values from data table but I am having problems ... import std.stdio; //

Re: dynamic get from variantArray() data table

2015-10-13 Thread Alex Parrill via Digitalmars-d-learn
On Tuesday, 13 October 2015 at 16:22:36 UTC, data pulverizer wrote: Thanks for the suggestion Alex, however I need the dynamic behaviour properties of variantArray(), writing a struct each time would be undesirable. Perhaps I could boil down the question to something like, is there a way of

Re: dynamic get from variantArray() data table

2015-10-13 Thread data pulverizer via Digitalmars-d-learn
Thanks for the suggestion Alex, however I need the dynamic behaviour properties of variantArray(), writing a struct each time would be undesirable. Perhaps I could boil down the question to something like, is there a way of writing auto x = dt[0][0]; auto y = x.get!(x.type - or whatever);