Descriptiontuple: further generalize/simplify Tuple implementation
Instead of specially implementing Tuple for 0 to 8 arguments, use a
more traditional implementation by having Tuple<A, B, ...> inherit
from TupleLeaf<0, A>, TupleLeaf<1, B>, etc. This allows Tuple to be
used with an arbitrary number of arguments.
To remain backwards compatible with code that accesses "t.a", "t.b",
etc., we specialize TupleLeaf for the first 8 elements to store their
values in appropriately named member variables. These accessors work
even for Tuples with more than 8 elements, but the 9th element and
beyond are only supported with get<N>().
Committed: https://crrev.com/06c626a8091b04618d0859e259f6a53dba6c617a
Cr-Commit-Position: refs/heads/master@{#307681}
Patch Set 1 #
Total comments: 10
Patch Set 2 : Respond to tzik/thakis feedback #Patch Set 3 : Remove NthType; add documentation for get<N>(Tuple&) #Messages
Total messages: 13 (3 generated)
|