3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/at-c.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Intrinsic Metafunctions / at_c |
template<
typename Sequence
, long n
>
struct[at\_c](./at-c.html){
typedef_unspecified_type;
};
Returns a type identical to the nth element from the beginning of the sequence. at_c<Sequence,n>::type is a shorcut notation for at< Sequence, long_<n> >::type.
#include <[boost/mpl/at.hpp](../../../../boost/mpl/at.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| Sequence | Forward Sequence | A sequence to be examined. |
| n | A compile-time integral constant | An offset from the beginning of the sequence specifying the element to be retrieved. |
typedef[at\_c](./at-c.html)<Sequence,n>::type t;
| Return type: |
A type
| | Precondition: |
0 <= n < size<Sequence>::value
| | Semantics: |
Equivalent to
typedef[at](./at.html)< Sequence,[long\_](./long.html)<n> >::type t;
|
| Sequence archetype | Complexity |
|---|---|
| Forward Sequence | Linear. |
| Random Access Sequence | Amortized constant time. |
typedef[range\_c](./range-c.html)<long,10,50> range;[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)( ([at\_c](./at-c.html)< range,0 >::type::value), ==, 10 );[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)( ([at\_c](./at-c.html)< range,10 >::type::value), ==, 20 );[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)( ([at\_c](./at-c.html)< range,40 >::type::value), ==, 50 );
Forward Sequence, Random Access Sequence, at, front, back
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |