1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
It is also possible to erase types from a tt(TypeList). Again, there are
several possibilities, each resulting in a different algorithm.
itemization(
it() The type to erase is specified, and the first
occurrence of that type is removed from the tt(TypeList);
it() The index of the type to erase is specified, and the type at that
index position is erased from the tt(TypeList);
it() The type to erase is specified, and all
occurrences of that type are removed from the tt(TypeList).
it() As a variant of erasure: we may want to erase all multiply
occurring types in a tt(TypeList), keeping each type only once.
)
Doubtlessly there are other ways of erasing types from a
tt(TypeList). Which ones eventually will be implemented depends of course on
the circumstances. As template meta programming is very powerful most if not
all algorithms can probably be implemented. As an illustration of how to erase
types from a tt(TypeList) the abovementioned algorithms are now developed in
the upcoming subsections.
|