...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Returns the actual type at a given index from the Sequence.
template< typename Seq, typename N> struct value_at { typedef unspecified type; };
Table 1.27. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
A model of Forward Sequence |
Argument sequence |
|
Index of element |
result_of::value_at<Seq, N>::type
Return type: Any type.
Semantics: Returns the actual type at
the N
th element of Seq
.
/sequence/intrinsic/value_at.hpp>
typedefvector
<int,float,char> vec; BOOST_MPL_ASSERT((boost::is_same<result_of::value_at
<vec, boost::mpl::int_<1> >::type, float>));