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
pop_front
Description

Returns a new sequence, with the first element of the original removed.

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

Table 1.83. Parameters

Parameter

Requirement

Description

seq

A model of Forward Sequence

Operation's argument


Expression Semantics
pop_front(seq);

Return type:

Semantics: Returns a new sequence containing all the elements of seq, except the first element. The elements in the new sequence are in the same order as they were in seq.

Complexity

Constant. Returns a view which is lazily evaluated.

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

PrevUpHomeNext