]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mpl/doc/src/refmanual/end.rst
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / mpl / doc / src / refmanual / end.rst
CommitLineData
7c673cae
FG
1.. Sequences/Intrinsic Metafunctions//end
2
3end
4===
5
6Synopsis
7--------
8
9.. parsed-literal::
10
11 template<
12 typename X
13 >
14 struct end
15 {
16 typedef |unspecified| type;
17 };
18
19
20
21Description
22-----------
23
24Returns the sequence's past-the-end iterator. If the argument is not a
25|Forward Sequence|, returns |void_|.
26
27
28Header
29------
30
31.. parsed-literal::
32
33 #include <boost/mpl/begin_end.hpp>
34
35
36Model of
37--------
38
39|Tag Dispatched Metafunction|
40
41
42Parameters
43----------
44
45+---------------+-------------------+-----------------------------------------------+
46| Parameter | Requirement | Description |
47+===============+===================+===============================================+
48| ``X`` | Any type | A type whose end iterator, if any, will be |
49| | | returned. |
50+---------------+-------------------+-----------------------------------------------+
51
52
53Expression semantics
54--------------------
55
56For any arbitrary type ``x``:
57
58.. parsed-literal::
59
60 typedef end<x>::type last;
61
62:Return type:
63 |Forward Iterator| or |void_|.
64
65:Semantics:
66 If ``x`` is |Forward Sequence|, ``last`` is an iterator pointing one past the
67 last element in ``s``; otherwise ``last`` is |void_|.
68
69:Postcondition:
70 If ``last`` is an iterator, it is past-the-end.
71
72
73Complexity
74----------
75
76Amortized constant time.
77
78
79Example
80-------
81
82.. parsed-literal::
83
84 typedef vector<long> v;
85 typedef begin<v>::type first;
86 typedef end<v>::type last;
87
88 BOOST_MPL_ASSERT(( is_same< next<first>::type, last > ));
89
90
91See also
92--------
93
94|Iterators|, |Forward Sequence|, |begin|, |end|, |next|
95
96
97