...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Sequences / Intrinsic Metafunctions / back |
Returns the last element in the sequence.
#include <boost/mpl/back.hpp>
Parameter | Requirement | Description |
---|---|---|
Sequence | Bidirectional Sequence | A sequence to be examined. |
For any Bidirectional Sequence s:
typedef back::type t;
Return type: | A type. |
---|---|
Precondition: | empty |
Semantics: | Equivalent to typedef deref< prior< end |
Amortized constant time.
typedef range_crange1; typedef range_c range2; typedef range_c range3; BOOST_MPL_ASSERT_RELATION( back ::value, ==, 0 ); BOOST_MPL_ASSERT_RELATION( back ::value, ==, 9 ); BOOST_MPL_ASSERT_RELATION( back ::value, ==, -1 );