tmp/tmpt2gj4itj/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Iterator support <a id="optional.ref.iterators">[[optional.ref.iterators]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
using iterator = implementation-defined;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
This type models `contiguous_iterator` [[iterator.concept.contiguous]],
|
| 8 |
+
meets the *Cpp17RandomAccessIterator*
|
| 9 |
+
requirements [[random.access.iterators]], and meets the requirements for
|
| 10 |
+
constexpr iterators [[iterator.requirements.general]], with value type
|
| 11 |
+
`remove_cv_t<T>`. The reference type is `T&` for `iterator`.
|
| 12 |
+
|
| 13 |
+
All requirements on container iterators [[container.reqmts]] apply to
|
| 14 |
+
`optional::iterator`.
|
| 15 |
+
|
| 16 |
+
``` cpp
|
| 17 |
+
constexpr iterator begin() const noexcept;
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
*Returns:* If `has_value()` is `true`, an iterator referring to
|
| 21 |
+
`*`*`val`*. Otherwise, a past-the-end iterator value.
|
| 22 |
+
|
| 23 |
+
``` cpp
|
| 24 |
+
constexpr iterator end() const noexcept;
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
*Returns:* `begin() + has_value()`.
|
| 28 |
+
|