1 .. Iterators/Iterator Metafunctions//prior |40
16 typedef |unspecified| type;
24 Returns the previous iterator in the sequence. |Note:| ``prior`` has a number of
25 overloaded meanings, depending on the type of its argument. For instance,
26 if ``X`` is an |Integral Constant|, ``prior<X>`` returns an decremented
27 |Integral Constant| of the same type. The following specification is
28 iterator-specific. Please refer to the corresponding concept's
29 documentation for the details of the alternative semantics |-- end note|.
37 #include <boost/mpl/next_prior.hpp>
43 +---------------+---------------------------+-----------------------------------+
44 | Parameter | Requirement | Description |
45 +===============+===========================+===================================+
46 | ``Iterator`` | |Bidirectional Iterator|. | An iterator to decrement. |
47 +---------------+---------------------------+-----------------------------------+
53 For any |Bidirectional Iterator|\ s ``iter``:
58 typedef prior<iter>::type j;
61 |Bidirectional Iterator|.
64 ``iter`` is decrementable.
67 ``j`` is an iterator pointing to the previous element in the sequence.
68 If ``iter`` is a user-defined iterator, the library-provided default
69 implementation is equivalent to
73 typedef iter::prior j;
79 Amortized constant time.
87 typedef vector_c<int,1> v;
88 typedef begin<v>::type first;
89 typedef end<v>::type last;
91 BOOST_MPL_ASSERT(( is_same< prior<last>::type, first > ));
97 |Iterators|, |begin| / |end|, |next|, |deref|
100 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
101 Distributed under the Boost Software License, Version 1.0. (See accompanying
102 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)