ptrs

flatten nested tuple into 1-d tuple with pointers of elements

ptrs
()
(
return ref Ts ts
)

Examples

auto t = tuple(1, 2, tuple(3, tuple(tuple(4, 5), 6), 7));
auto p = t.ptrs;
*p[1] = 222;
auto d = t.flatten;
assert(d == tuple(1, 222, 3, 4, 5, 6, 7));

static foreach (i; 0 .. t.length) {
    assert(*p[i] == d[i]);
}

Meta