std.variant; Variant v = [[1], [2], [3]]; writeln(v.type); // int[][] typeof(v.type); // TypeInfo assert(v.type == typeid(int[][]);
As demonstrated by the assert statement, .type returns the typeid of the underlying type. How would I obtain the actual type such that:
auto vb = v.base; // what should I put here to achieve the following:
typeof(vb); // int[][] assert(vb == [[1], [2], [3]]); --anonymouse