The following paper is the first proposal I found for template parameter packs.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1603.pdf
At page 16, it talks about introducing two new operators [] and <> for accessing parameter pack elements and parameter pack types.
The suggested syntax for such an operator involves two new operators: .[] to access values and .<> to access types. For instance:
template<int N, typename Tuple> struct tuple_element;
template<int N, ... Elements>
struct tuple_element<tuple<Elements...> >
{
typedef Elements.<N> type;
};
template<int N, ... Elements>
Elements.<N>& get(tuple<Elements...>& t)
{ return t.[N]; }
template<int N, ... Elements>
const Elements.<N>& get(const tuple<Elements...>& t)
{ return t.[N]; }
So where are these operators? If there is none, what is their replacement?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…