...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
clear returns an empty sequence.
template< typename Sequence > typename result_of::clear<Sequence const>::type clear(Sequence const& seq);
Table 1.62. Parameters
Parameter |
Requirement |
Description |
---|---|---|
seq |
A model of Forward Sequence |
Operation's argument |
clear(seq);
Return type: A model of Forward Sequence.
Expression Semantics: Returns a sequence with no elements.
Constant.
#include <boost/fusion/algorithm/transformation/clear.hpp> #include <boost/fusion/include/clear.hpp>
assert(clear(make_vector(1,2,3)) == make_vector());