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 an older version of Boost and was released in 2017. The current version is 1.89.0.
Returns the result type of at[7].
template< typename Seq, typename M> struct at { typedef unspecified type; };
Table 1.28. Parameters
|
Parameter |
Requirement |
Description |
|---|---|---|
|
|
A model of Random Access Sequence |
Argument sequence |
|
|
Index of element |
result_of::at<Seq, M>::type
Return type: Any type.
Precondition: 0
<= M::value < (where result_of::size<Seq>::valueSeq
is not Unbounded
Sequence)
Semantics: Returns the result type of
using at to access the Mth element of Seq.
#include <boost/fusion/sequence/intrinsic/at.hpp> #include <boost/fusion/include/at.hpp>
typedefvector<int,float,char> vec; BOOST_MPL_ASSERT((boost::is_same<result_of::at<vec, boost::mpl::int_<1> >::type, float&>));
[7]
result_of::at reflects the actual return
type of the function at. Sequence(s)
typically return references to its elements via the at function. If you want to
get the actual element type, use result_of::value_at