...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The TR1
Tuple provides the get
function to provide access to it's elements by zero based numeric index.
template<int I, T> RJ get(T& t);
Requires: 0
< I
<= N
.
The program is ill formed if I
is out of bounds. T
is
any fusion sequence type, including tuple
.
Return type: RJ
is equivalent to
.
result_of::at_c
<I,T>::type
Returns: A reference to the I
th element of T
.
template<int I, typename T> PJ get(T const& t);
Requires: 0
< I
<= N
.
The program is ill formed if I
is out of bounds. T
is
any fusion sequence type, including tuple
.
Return type: PJ
is equivalent to
.
result_of::at_c
<I,T>::type
Returns: A const reference to the I
th element of T
.