
9 Jan
2015
9 Jan
'15
6:16 p.m.
Eelis wrote:
Really, variant<> should have been index-based all along, so that you can just do get<0> and get<1> on a variant
(or a variant where A might be B) without losing information.
Adding get<I> to variant is trivial - it already stores the index and
exposes it in which(). But you can't store anything into variant