1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <!DOCTYPE header PUBLIC
"-//Boost//DTD BoostBook XML V1.0//EN"
3 "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
4 <header name=
"boost/last_value.hpp" last-revision=
"$Date$">
5 <namespace name=
"boost">
6 <class name=
"last_value">
8 <template-type-parameter name=
"T"/>
11 <purpose>Evaluate an
<conceptname>InputIterator
</conceptname> sequence and return the
12 last value in the sequence.
</purpose>
14 <typedef name=
"result_type"><type>T
</type></typedef>
16 <method-group name=
"invocation">
17 <method name=
"operator()" cv=
"const">
19 <template-type-parameter name=
"InputIterator"/>
21 <type>result_type
</type>
22 <parameter name=
"first">
23 <paramtype>InputIterator
</paramtype>
25 <parameter name=
"last">
26 <paramtype>InputIterator
</paramtype>
29 <requires><para><computeroutput>first != last
</computeroutput></para></requires>
30 <effects><para>Dereferences every iterator in the sequence
<computeroutput>[first, last)
</computeroutput>.
</para></effects>
32 <returns><para>The result of dereferencing the iterator
<computeroutput>last-
1</computeroutput>.
</para></returns>
37 <class-specialization name=
"last_value">
40 <template-arg>void
</template-arg>
43 <purpose>Evaluate an InputIterator sequence.
</purpose>
45 <typedef name=
"result_type">
46 <type><emphasis>unspecified
</emphasis></type>
49 <method-group name=
"invocation">
50 <method name=
"operator()" cv=
"const">
52 <template-type-parameter name=
"InputIterator"/>
54 <type>result_type
</type>
55 <parameter name=
"first">
56 <paramtype>InputIterator
</paramtype>
58 <parameter name=
"last">
59 <paramtype>InputIterator
</paramtype>
62 <effects><para>Dereferences every iterator in the sequence
<computeroutput>[first, last)
</computeroutput>.
</para></effects>
65 </class-specialization>