tmp/tmpcxq2cwn_/{from.md → to.md}
RENAMED
|
@@ -1,175 +0,0 @@
|
|
| 1 |
-
## Container access <a id="iterator.container">[[iterator.container]]</a>
|
| 2 |
-
|
| 3 |
-
In addition to being available via inclusion of the `<iterator>` header,
|
| 4 |
-
the function templates in [[iterator.container]] are available when any
|
| 5 |
-
of the following headers are included: `<array>`, `<deque>`,
|
| 6 |
-
`<forward_list>`, `<list>`, `<map>`, `<regex>`, `<set>`, `<string>`,
|
| 7 |
-
`<unordered_map>`, `<unordered_set>`, and `<vector>`.
|
| 8 |
-
|
| 9 |
-
``` cpp
|
| 10 |
-
template <class C> constexpr auto size(const C& c) -> decltype(c.size());
|
| 11 |
-
```
|
| 12 |
-
|
| 13 |
-
*Returns:* `c.size()`.
|
| 14 |
-
|
| 15 |
-
``` cpp
|
| 16 |
-
template <class T, size_t N> constexpr size_t size(const T (&array)[N]) noexcept;
|
| 17 |
-
```
|
| 18 |
-
|
| 19 |
-
*Returns:* `N`.
|
| 20 |
-
|
| 21 |
-
``` cpp
|
| 22 |
-
template <class C> constexpr auto empty(const C& c) -> decltype(c.empty());
|
| 23 |
-
```
|
| 24 |
-
|
| 25 |
-
*Returns:* `c.empty()`.
|
| 26 |
-
|
| 27 |
-
``` cpp
|
| 28 |
-
template <class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept;
|
| 29 |
-
```
|
| 30 |
-
|
| 31 |
-
*Returns:* `false`.
|
| 32 |
-
|
| 33 |
-
``` cpp
|
| 34 |
-
template <class E> constexpr bool empty(initializer_list<E> il) noexcept;
|
| 35 |
-
```
|
| 36 |
-
|
| 37 |
-
*Returns:* `il.size() == 0`.
|
| 38 |
-
|
| 39 |
-
``` cpp
|
| 40 |
-
template <class C> constexpr auto data(C& c) -> decltype(c.data());
|
| 41 |
-
template <class C> constexpr auto data(const C& c) -> decltype(c.data());
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
*Returns:* `c.data()`.
|
| 45 |
-
|
| 46 |
-
``` cpp
|
| 47 |
-
template <class T, size_t N> constexpr T* data(T (&array)[N]) noexcept;
|
| 48 |
-
```
|
| 49 |
-
|
| 50 |
-
*Returns:* `array`.
|
| 51 |
-
|
| 52 |
-
``` cpp
|
| 53 |
-
template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
|
| 54 |
-
```
|
| 55 |
-
|
| 56 |
-
*Returns:* `il.begin()`.
|
| 57 |
-
|
| 58 |
-
<!-- Link reference definitions -->
|
| 59 |
-
[back.insert.iter.cons]: #back.insert.iter.cons
|
| 60 |
-
[back.insert.iter.op*]: #back.insert.iter.op*
|
| 61 |
-
[back.insert.iter.op++]: #back.insert.iter.op++
|
| 62 |
-
[back.insert.iter.op=]: #back.insert.iter.op=
|
| 63 |
-
[back.insert.iter.ops]: #back.insert.iter.ops
|
| 64 |
-
[back.insert.iterator]: #back.insert.iterator
|
| 65 |
-
[back.inserter]: #back.inserter
|
| 66 |
-
[bidirectional.iterators]: #bidirectional.iterators
|
| 67 |
-
[containers]: containers.md#containers
|
| 68 |
-
[forward.iterators]: #forward.iterators
|
| 69 |
-
[front.insert.iter.cons]: #front.insert.iter.cons
|
| 70 |
-
[front.insert.iter.op*]: #front.insert.iter.op*
|
| 71 |
-
[front.insert.iter.op++]: #front.insert.iter.op++
|
| 72 |
-
[front.insert.iter.op=]: #front.insert.iter.op=
|
| 73 |
-
[front.insert.iter.ops]: #front.insert.iter.ops
|
| 74 |
-
[front.insert.iterator]: #front.insert.iterator
|
| 75 |
-
[front.inserter]: #front.inserter
|
| 76 |
-
[input.iterators]: #input.iterators
|
| 77 |
-
[insert.iter.cons]: #insert.iter.cons
|
| 78 |
-
[insert.iter.op*]: #insert.iter.op*
|
| 79 |
-
[insert.iter.op++]: #insert.iter.op++
|
| 80 |
-
[insert.iter.op=]: #insert.iter.op=
|
| 81 |
-
[insert.iter.ops]: #insert.iter.ops
|
| 82 |
-
[insert.iterator]: #insert.iterator
|
| 83 |
-
[insert.iterators]: #insert.iterators
|
| 84 |
-
[inserter]: #inserter
|
| 85 |
-
[iostream.format]: input.md#iostream.format
|
| 86 |
-
[istream.iterator]: #istream.iterator
|
| 87 |
-
[istream.iterator.cons]: #istream.iterator.cons
|
| 88 |
-
[istream.iterator.ops]: #istream.iterator.ops
|
| 89 |
-
[istreambuf.iterator]: #istreambuf.iterator
|
| 90 |
-
[istreambuf.iterator.cons]: #istreambuf.iterator.cons
|
| 91 |
-
[istreambuf.iterator.ops]: #istreambuf.iterator.ops
|
| 92 |
-
[istreambuf.iterator.proxy]: #istreambuf.iterator.proxy
|
| 93 |
-
[iterator.container]: #iterator.container
|
| 94 |
-
[iterator.iterators]: #iterator.iterators
|
| 95 |
-
[iterator.operations]: #iterator.operations
|
| 96 |
-
[iterator.primitives]: #iterator.primitives
|
| 97 |
-
[iterator.range]: #iterator.range
|
| 98 |
-
[iterator.requirements]: #iterator.requirements
|
| 99 |
-
[iterator.requirements.general]: #iterator.requirements.general
|
| 100 |
-
[iterator.synopsis]: #iterator.synopsis
|
| 101 |
-
[iterator.traits]: #iterator.traits
|
| 102 |
-
[iterators]: #iterators
|
| 103 |
-
[iterators.general]: #iterators.general
|
| 104 |
-
[move.iter.nonmember]: #move.iter.nonmember
|
| 105 |
-
[move.iter.op.+]: #move.iter.op.+
|
| 106 |
-
[move.iter.op.+=]: #move.iter.op.+=
|
| 107 |
-
[move.iter.op.-]: #move.iter.op.-
|
| 108 |
-
[move.iter.op.-=]: #move.iter.op.-=
|
| 109 |
-
[move.iter.op.comp]: #move.iter.op.comp
|
| 110 |
-
[move.iter.op.const]: #move.iter.op.const
|
| 111 |
-
[move.iter.op.conv]: #move.iter.op.conv
|
| 112 |
-
[move.iter.op.decr]: #move.iter.op.decr
|
| 113 |
-
[move.iter.op.incr]: #move.iter.op.incr
|
| 114 |
-
[move.iter.op.index]: #move.iter.op.index
|
| 115 |
-
[move.iter.op.ref]: #move.iter.op.ref
|
| 116 |
-
[move.iter.op.star]: #move.iter.op.star
|
| 117 |
-
[move.iter.op=]: #move.iter.op=
|
| 118 |
-
[move.iter.ops]: #move.iter.ops
|
| 119 |
-
[move.iter.requirements]: #move.iter.requirements
|
| 120 |
-
[move.iterator]: #move.iterator
|
| 121 |
-
[move.iterators]: #move.iterators
|
| 122 |
-
[ostream.iterator]: #ostream.iterator
|
| 123 |
-
[ostream.iterator.cons.des]: #ostream.iterator.cons.des
|
| 124 |
-
[ostream.iterator.ops]: #ostream.iterator.ops
|
| 125 |
-
[ostreambuf.iter.cons]: #ostreambuf.iter.cons
|
| 126 |
-
[ostreambuf.iter.ops]: #ostreambuf.iter.ops
|
| 127 |
-
[ostreambuf.iterator]: #ostreambuf.iterator
|
| 128 |
-
[output.iterators]: #output.iterators
|
| 129 |
-
[predef.iterators]: #predef.iterators
|
| 130 |
-
[random.access.iterators]: #random.access.iterators
|
| 131 |
-
[reverse.iter.cons]: #reverse.iter.cons
|
| 132 |
-
[reverse.iter.conv]: #reverse.iter.conv
|
| 133 |
-
[reverse.iter.make]: #reverse.iter.make
|
| 134 |
-
[reverse.iter.op!=]: #reverse.iter.op!=
|
| 135 |
-
[reverse.iter.op+]: #reverse.iter.op+
|
| 136 |
-
[reverse.iter.op++]: #reverse.iter.op++
|
| 137 |
-
[reverse.iter.op+=]: #reverse.iter.op+=
|
| 138 |
-
[reverse.iter.op-]: #reverse.iter.op-
|
| 139 |
-
[reverse.iter.op-=]: #reverse.iter.op-=
|
| 140 |
-
[reverse.iter.op.star]: #reverse.iter.op.star
|
| 141 |
-
[reverse.iter.op<]: #reverse.iter.op<
|
| 142 |
-
[reverse.iter.op<=]: #reverse.iter.op<=
|
| 143 |
-
[reverse.iter.op=]: #reverse.iter.op=
|
| 144 |
-
[reverse.iter.op==]: #reverse.iter.op==
|
| 145 |
-
[reverse.iter.op>]: #reverse.iter.op>
|
| 146 |
-
[reverse.iter.op>=]: #reverse.iter.op>=
|
| 147 |
-
[reverse.iter.opdiff]: #reverse.iter.opdiff
|
| 148 |
-
[reverse.iter.opindex]: #reverse.iter.opindex
|
| 149 |
-
[reverse.iter.opref]: #reverse.iter.opref
|
| 150 |
-
[reverse.iter.ops]: #reverse.iter.ops
|
| 151 |
-
[reverse.iter.opsum]: #reverse.iter.opsum
|
| 152 |
-
[reverse.iter.requirements]: #reverse.iter.requirements
|
| 153 |
-
[reverse.iterator]: #reverse.iterator
|
| 154 |
-
[reverse.iterators]: #reverse.iterators
|
| 155 |
-
[std.iterator.tags]: #std.iterator.tags
|
| 156 |
-
[stream.buffers]: input.md#stream.buffers
|
| 157 |
-
[stream.iterators]: #stream.iterators
|
| 158 |
-
[swappable.requirements]: library.md#swappable.requirements
|
| 159 |
-
[tab:copyassignable]: #tab:copyassignable
|
| 160 |
-
[tab:equalitycomparable]: #tab:equalitycomparable
|
| 161 |
-
[tab:iterator.bidirectional.requirements]: #tab:iterator.bidirectional.requirements
|
| 162 |
-
[tab:iterator.forward.requirements]: #tab:iterator.forward.requirements
|
| 163 |
-
[tab:iterator.input.requirements]: #tab:iterator.input.requirements
|
| 164 |
-
[tab:iterator.output.requirements]: #tab:iterator.output.requirements
|
| 165 |
-
[tab:iterator.random.access.requirements]: #tab:iterator.random.access.requirements
|
| 166 |
-
[tab:iterator.requirements]: #tab:iterator.requirements
|
| 167 |
-
[tab:iterators.lib.summary]: #tab:iterators.lib.summary
|
| 168 |
-
[tab:iterators.relations]: #tab:iterators.relations
|
| 169 |
-
[temp.deduct]: temp.md#temp.deduct
|
| 170 |
-
[temp.inst]: temp.md#temp.inst
|
| 171 |
-
[utility.arg.requirements]: library.md#utility.arg.requirements
|
| 172 |
-
|
| 173 |
-
[^1]: This definition applies to pointers, since pointers are iterators.
|
| 174 |
-
The effect of dereferencing an iterator that has been invalidated is
|
| 175 |
-
undefined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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