]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | .. Sequences/Concepts//Bidirectional Sequence |20 |
2 | ||
3 | Bidirectional Sequence | |
4 | ====================== | |
5 | ||
6 | Description | |
7 | ----------- | |
8 | ||
9 | A |Bidirectional Sequence| is a |Forward Sequence| whose iterators model | |
10 | |Bidirectional Iterator|. | |
11 | ||
12 | Refinement of | |
13 | ------------- | |
14 | ||
15 | |Forward Sequence| | |
16 | ||
17 | ||
18 | Expression requirements | |
19 | ----------------------- | |
20 | ||
21 | In addition to the requirements defined in |Forward Sequence|, | |
22 | for any |Bidirectional Sequence| ``s`` the following must be met: | |
23 | ||
24 | +---------------------------+-----------------------------------+---------------------------+ | |
25 | | Expression | Type | Complexity | | |
26 | +===========================+===================================+===========================+ | |
27 | | ``begin<s>::type`` | |Bidirectional Iterator| | Amortized constant time | | |
28 | +---------------------------+-----------------------------------+---------------------------+ | |
29 | | ``end<s>::type`` | |Bidirectional Iterator| | Amortized constant time | | |
30 | +---------------------------+-----------------------------------+---------------------------+ | |
31 | | ``back<s>::type`` | Any type | Amortized constant time | | |
32 | +---------------------------+-----------------------------------+---------------------------+ | |
33 | ||
34 | ||
35 | Expression semantics | |
36 | -------------------- | |
37 | ||
38 | |Semantics disclaimer...| |Forward Sequence|. | |
39 | ||
40 | +---------------------------+-----------------------------------------------------------------------+ | |
41 | | Expression | Semantics | | |
42 | +===========================+=======================================================================+ | |
43 | | ``back<s>::type`` | The last element in the sequence; see |back|. | | |
44 | +---------------------------+-----------------------------------------------------------------------+ | |
45 | ||
46 | ||
47 | Models | |
48 | ------ | |
49 | ||
50 | * |vector| | |
51 | * |range_c| | |
52 | ||
53 | ||
54 | See also | |
55 | -------- | |
56 | ||
57 | |Sequences|, |Forward Sequence|, |Random Access Sequence|, |Bidirectional Iterator|, |begin| / |end|, |back| | |
58 | ||
59 | ||
60 |