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 2024. The current version is 1.89.0.
clear returns an empty sequence.
template<
typename Sequence
>
typename result_of::clear<Sequence const>::type clear(Sequence const& seq);
Table 1.75. Parameters
|
Parameter |
Requirement |
Description |
|---|---|---|
|
|
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());