From Jason Turner

[thread.lock.unique.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpenap1une/{from.md → to.md} +3 -11
tmp/tmpenap1une/{from.md → to.md} RENAMED
@@ -75,24 +75,16 @@ unique_lock(unique_lock&& u) noexcept;
75
  *Ensures:* `pm == u_p.pm` and `owns == u_p.owns` (where `u_p` is the
76
  state of `u` just prior to this construction), `u.pm == 0` and
77
  `u.owns == false`.
78
 
79
  ``` cpp
80
- unique_lock& operator=(unique_lock&& u);
81
  ```
82
 
83
- *Effects:* If `owns` calls `pm->unlock()`.
84
 
85
- *Ensures:* `pm == u_p.pm` and `owns == u_p.owns` (where `u_p` is the
86
- state of `u` just prior to this construction), `u.pm == 0` and
87
- `u.owns == false`.
88
-
89
- [*Note 1*: With a recursive mutex it is possible for both `*this` and
90
- `u` to own the same mutex before the assignment. In this case, `*this`
91
- will own the mutex after the assignment and `u` will not. — *end note*]
92
-
93
- *Throws:* Nothing.
94
 
95
  ``` cpp
96
  ~unique_lock();
97
  ```
98
 
 
75
  *Ensures:* `pm == u_p.pm` and `owns == u_p.owns` (where `u_p` is the
76
  state of `u` just prior to this construction), `u.pm == 0` and
77
  `u.owns == false`.
78
 
79
  ``` cpp
80
+ unique_lock& operator=(unique_lock&& u) noexcept;
81
  ```
82
 
83
+ *Effects:* Equivalent to: `unique_lock(std::move(u)).swap(*this)`
84
 
85
+ *Returns:* `*this`.
 
 
 
 
 
 
 
 
86
 
87
  ``` cpp
88
  ~unique_lock();
89
  ```
90