1
// last_value function object (documented as part of Boost.Signals)
3
// Copyright Douglas Gregor 2001-2003. Use, modification and
4
// distribution is subject to the Boost Software License, Version
5
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6
// http://www.boost.org/LICENSE_1_0.txt)
8
// For more information, see http://www.boost.org/libs/signals
10
#ifndef BOOST_LAST_VALUE_HPP
11
#define BOOST_LAST_VALUE_HPP
14
#include <boost/config.hpp>
19
typedef T result_type;
21
template<typename InputIterator>
22
T operator()(InputIterator first, InputIterator last) const
24
assert(first != last);
33
struct last_value<void> {
34
#ifdef BOOST_NO_VOID_RETURNS
38
typedef unusable result_type;
41
typedef void result_type;
42
#endif // BOOST_NO_VOID_RETURNS
44
template<typename InputIterator>
46
operator()(InputIterator first, InputIterator last) const
54
#endif // BOOST_SIGNALS_LAST_VALUE_HPP