source:
downloads/boost_1_33_1/libs/mpl/doc/src/refmanual/end.rst
@
12
| Last change on this file since 12 was 12, checked in by landauf, 18 years ago | |
|---|---|
| File size: 1.7 KB | |
end
Synopsis
template<
typename X
>
struct end
{
typedef |unspecified| type;
};
Description
Returns the sequence's past-the-end iterator. If the argument is not a |Forward Sequence|, returns |void_|.
Header
#include <boost/mpl/begin_end.hpp>
Model of
Parameters
| Parameter | Requirement | Description |
|---|---|---|
| X | Any type | A type whose end iterator, if any, will be returned. |
Expression semantics
For any arbitrary type x:
typedef end<x>::type last;
| Return type: | |Forward Iterator| or |void_|. |
|---|---|
| Semantics: | If x is |Forward Sequence|, last is an iterator pointing one past the last element in s; otherwise last is |void_|. |
| Postcondition: | If last is an iterator, it is past-the-end. |
Complexity
Amortized constant time.
Example
typedef vector<long> v; typedef begin<v>::type first; typedef end<v>::type last; BOOST_MPL_ASSERT(( is_same< next<first>::type, last > ));
See also
Note: See TracBrowser
for help on using the repository browser.










