tmp/tmp2_8xho52/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Constructors and conversions <a id="common.iter.const">[[common.iter.const]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
constexpr common_iterator(I i);
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Effects:* Initializes `v_` as if by
|
| 8 |
+
`v_{in_place_type<I>, std::move(i)}`.
|
| 9 |
+
|
| 10 |
+
``` cpp
|
| 11 |
+
constexpr common_iterator(S s);
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
*Effects:* Initializes `v_` as if by
|
| 15 |
+
`v_{in_place_type<S>, std::move(s)}`.
|
| 16 |
+
|
| 17 |
+
``` cpp
|
| 18 |
+
template<class I2, class S2>
|
| 19 |
+
requires convertible_to<const I2&, I> && convertible_to<const S2&, S>
|
| 20 |
+
constexpr common_iterator(const common_iterator<I2, S2>& x);
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
*Preconditions:* `x.v_.valueless_by_exception()` is `false`.
|
| 24 |
+
|
| 25 |
+
*Effects:* Initializes `v_` as if by
|
| 26 |
+
`v_{in_place_index<`i`>, get<`i`>(x.v_)}`, where i is `x.v_.index()`.
|
| 27 |
+
|
| 28 |
+
``` cpp
|
| 29 |
+
template<class I2, class S2>
|
| 30 |
+
requires convertible_to<const I2&, I> && convertible_to<const S2&, S> &&
|
| 31 |
+
assignable_from<I&, const I2&> && assignable_from<S&, const S2&>
|
| 32 |
+
common_iterator& operator=(const common_iterator<I2, S2>& x);
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
*Preconditions:* `x.v_.valueless_by_exception()` is `false`.
|
| 36 |
+
|
| 37 |
+
*Effects:* Equivalent to:
|
| 38 |
+
|
| 39 |
+
- If `v_.index() == x.v_.index()`, then `get<`i`>(v_) = get<`i`>(x.v_)`.
|
| 40 |
+
- Otherwise, `v_.emplace<`i`>(get<`i`>(x.v_))`.
|
| 41 |
+
|
| 42 |
+
where i is `x.v_.index()`.
|
| 43 |
+
|
| 44 |
+
*Returns:* `*this`
|
| 45 |
+
|