Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
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