1 .. Sequences/Intrinsic Metafunctions//back
16 typedef |unspecified| type;
24 Returns the last element in the sequence.
32 #include <boost/mpl/back.hpp>
38 |Tag Dispatched Metafunction|
44 +---------------+---------------------------+-----------------------------------+
45 | Parameter | Requirement | Description |
46 +===============+===========================+===================================+
47 | ``Sequence`` | |Bidirectional Sequence| | A sequence to be examined. |
48 +---------------+---------------------------+-----------------------------------+
54 For any |Bidirectional Sequence| ``s``:
58 typedef back<s>::type t;
64 ``empty<s>::value == false``.
71 typedef deref< prior< end<s>::type >::type >::type t;
78 Amortized constant time.
86 typedef range_c<int,0,1> range1;
87 typedef range_c<int,0,10> range2;
88 typedef range_c<int,-10,0> range3;
90 BOOST_MPL_ASSERT_RELATION( back<range1>::value, ==, 0 );
91 BOOST_MPL_ASSERT_RELATION( back<range2>::value, ==, 9 );
92 BOOST_MPL_ASSERT_RELATION( back<range3>::value, ==, -1 );
98 |Bidirectional Sequence|, |front|, |push_back|, |end|, |deref|, |at|
101 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
102 Distributed under the Boost Software License, Version 1.0. (See accompanying
103 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)