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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
clear
Description

clear returns an empty sequence.

Synposis
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

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