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 old version of boost. Click here for the latest version's documentation home page.

[Home]end

Synopsis

template<
      typename Sequence
    >
struct end
{
    typedef unspecified type;
};

Description

Returns the past-the-end iterator to the sequence.

Definition

#include "boost/mpl/begin_end.hpp"

Parameters

 Parameter  Requirement  Description  
SequenceA model of Sequence

Expression semantics

 Expression  Expression type  Precondition  Semantics  Postcondition  
typedef end<Sequence>::type last;A model of Input Iteratorlast is an iterator pointing one past the last element in the Sequence; equivalent to Sequence::end unless the algorithm has been specialized for the particular type of sequence.last is past-the-end.

Complexity

Amortized constant time.

Example

typedef list<long> short_list;
typedef begin<short_list>::type first;
typedef end<short_list>::type last;
BOOST_STATIC_ASSERT((boost::is_same<first::next,last>::value));

See also

Iterators, Sequence, begin, size, empty


Table of Contents
Last edited July 22, 2002 4:30 pm