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

PrevUpHomeNext
clear
Description

clear returns an empty sequence.

Synopsis
template<
    typename Sequence
    >
typename result_of::clear<Sequence const>::type clear(Sequence const& seq);

Table 1.75. Parameters

Parameter

Requirement

Description

seq

A model of Forward Sequence

Operation's argument


Expression Semantics
clear(seq);

Return type: A model of Forward Sequence.

Expression Semantics: Returns a sequence with no elements.

Complexity

Constant.

Header
#include <boost/fusion/algorithm/transformation/clear.hpp>
#include <boost/fusion/include/clear.hpp>
Example
assert(clear(make_vector(1,2,3)) == make_vector());

PrevUpHomeNext