...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Returns a type convertible to bool that evaluates to true if the sequence is empty, else, evaluates to false.
template <typename Sequence> typename result_of::empty<Sequence>::type empty(Sequence const& seq);
Parameter |
Requirement |
Description |
---|---|---|
seq |
Model of Forward Sequence |
The sequence we wish to investigate. |
empty(seq);
Return type: Convertible to bool.
Semantics: Evaluates to true if the sequence is empty, else, evaluates to false.
#include <boost/fusion/sequence/intrinsic/empty.hpp> #include <boost/fusion/include/empty.hpp>
vector<int, int, int> v(1, 2, 3); assert(empty(v) == false);