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.
Class template last_value
c++boost.gif (8819 bytes)HomeLibrariesPeopleFAQMore

Class template last_value

boost::last_value — Evaluate an InputIterator sequence and return the last value in the sequence.

Synopsis

template<typename T> 
class last_value {
public:
  // types
  typedef T result_type;

  // invocation
  template<typename InputIterator> 
    result_type operator()(InputIterator, InputIterator) const;
};

Description

last_value invocation

  1. template<typename InputIterator> 
      result_type operator()(InputIterator first, InputIterator last) const;

    Requires: first != last
    Effects: Dereferences every iterator in the sequence [first, last).
    Returns: The result of dereferencing the iterator last-1.

Specializations

Last revised: , at GMTCopyright © 2001-2003 Douglas Gregor