...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 result type of size.
template<typename Seq> struct size { typedef unspecified type; };
Table 1.24. Parameters
Parameter |
Requirement |
Description |
---|---|---|
Seq |
A model of Forward Sequence |
Argument sequence |
result_of::size<Seq>::type
Return type: An MPL Integral Constant.
Semantics: Returns the number of elements in Seq.
/sequence/intrinsic/size.hpp>
typedef vector<int,float,char> vec; typedef result_of::size<vec>::type size_mpl_integral_constant; BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3);