...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 empty.
template<typename Seq> struct empty { typedef unspecified type; };
Table 1.21. Parameters
Parameter |
Requirement |
Description |
---|---|---|
Seq |
A model of Forward Sequence |
Argument sequence |
result_of::empty<Seq>::type
Return type: An MPL Integral Constant
Semantics: Returns mpl::true_ if Seq has zero elements, mpl::false_ otherwise.
/sequence/intrinsic/empty.hpp>
typedef vector<> empty_vec; typedef vector<int,float,char> vec; BOOST_MPL_ASSERT((result_of::empty<empty_vec>)); BOOST_MPL_ASSERT_NOT((result_of::empty<vec>));