From Jason Turner

[any.assign]

Diff to HTML by rtfpessoa

tmp/tmp_jeb1z0m/{from.md → to.md} RENAMED
@@ -18,30 +18,28 @@ any& operator=(any&& rhs) noexcept;
18
 
19
  *Effects:* As if by `any(std::move(rhs)).swap(*this)`.
20
 
21
  *Returns:* `*this`.
22
 
23
- *Postconditions:* The state of `*this` is equivalent to the original
24
- state of `rhs` and `rhs` is left in a valid but otherwise unspecified
25
- state.
26
 
27
  ``` cpp
28
  template<class T>
29
  any& operator=(T&& rhs);
30
  ```
31
 
32
  Let `VT` be `decay_t<T>`.
33
 
34
- *Requires:* `VT` shall satisfy the `CopyConstructible` requirements.
 
 
 
35
 
36
  *Effects:* Constructs an object `tmp` of type `any` that contains an
37
  object of type `VT` direct-initialized with `std::forward<T>(rhs)`, and
38
  `tmp.swap(*this)`. No effects if an exception is thrown.
39
 
40
  *Returns:* `*this`.
41
 
42
- *Remarks:* This operator shall not participate in overload resolution
43
- unless `VT` is not the same type as `any` and
44
- `is_copy_constructible_v<VT>` is `true`.
45
-
46
  *Throws:* Any exception thrown by the selected constructor of `VT`.
47
 
 
18
 
19
  *Effects:* As if by `any(std::move(rhs)).swap(*this)`.
20
 
21
  *Returns:* `*this`.
22
 
23
+ *Ensures:* The state of `*this` is equivalent to the original state of
24
+ `rhs`.
 
25
 
26
  ``` cpp
27
  template<class T>
28
  any& operator=(T&& rhs);
29
  ```
30
 
31
  Let `VT` be `decay_t<T>`.
32
 
33
+ *Constraints:* `VT` is not the same type as `any` and
34
+ `is_copy_constructible_v<VT>` is `true`.
35
+
36
+ *Preconditions:* `VT` meets the *Cpp17CopyConstructible* requirements.
37
 
38
  *Effects:* Constructs an object `tmp` of type `any` that contains an
39
  object of type `VT` direct-initialized with `std::forward<T>(rhs)`, and
40
  `tmp.swap(*this)`. No effects if an exception is thrown.
41
 
42
  *Returns:* `*this`.
43
 
 
 
 
 
44
  *Throws:* Any exception thrown by the selected constructor of `VT`.
45