// Select stuff - templates that define selection in the general case (4ed, page 792). // Uses variadic templates (4ed, 809). C++11. // select - declared, but never instantiated. The specialization below will be instantiated template struct select; // Specialization that just recurses in the base type: template struct select: select{ }; // Specialization that represent the base case of the recursion. // Defines what type stands for: template struct select<0, T, Types...>{ using type = T; }; // A using alias Select that embellish the use of select - as before: template using Select = typename select::type;