Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Element access

Description

The TR1 Tuple provides the get function to provide access to it's elements by zero based numeric index.

Specification
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 Ith 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 Ith element of T.


PrevUpHomeNext