1 // last_value function object (documented as part of Boost.Signals)
3 // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
5 // Permission to copy, use, sell and distribute this software is granted
6 // provided this copyright notice appears in all copies.
7 // Permission to modify the code and to distribute modified code is granted
8 // provided this copyright notice appears in all copies, and a notice
9 // that the code was modified is included with the copyright notice.
11 // This software is provided "as is" without express or implied warranty,
12 // and with no claim as to its suitability for any purpose.
14 // For more information, see http://www.boost.org
16 #ifndef BOOST_LAST_VALUE_HPP
17 #define BOOST_LAST_VALUE_HPP
24 typedef T result_type;
26 template<typename InputIterator>
27 T operator()(InputIterator first, InputIterator last) const
29 assert(first != last);
38 struct last_value<void> {
42 typedef unusable result_type;
44 template<typename InputIterator>
46 operator()(InputIterator first, InputIterator last) const
54 #endif // BOOST_SIGNALS_LAST_VALUE_HPP