From Jason Turner

[common.iter.const]

Diff to HTML by rtfpessoa

tmp/tmpezgrbznu/{from.md → to.md} RENAMED
@@ -18,11 +18,11 @@ constexpr common_iterator(S s);
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
@@ -30,16 +30,16 @@ 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
  constexpr 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
 
 
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
+ `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
 
30
  requires convertible_to<const I2&, I> && convertible_to<const S2&, S> &&
31
  assignable_from<I&, const I2&> && assignable_from<S&, const S2&>
32
  constexpr common_iterator& operator=(const common_iterator<I2, S2>& x);
33
  ```
34
 
35
+ `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