From Jason Turner

[thread.lock.guard]

Diff to HTML by rtfpessoa

tmp/tmpuoqnx4y9/{from.md → to.md} RENAMED
@@ -30,26 +30,23 @@ object referenced by `pm` does not exist for the entire lifetime of the
30
 
31
  ``` cpp
32
  explicit lock_guard(mutex_type& m);
33
  ```
34
 
35
- *Preconditions:* If `mutex_type` is not a recursive mutex, the calling
36
- thread does not own the mutex `m`.
37
-
38
  *Effects:* Initializes `pm` with `m`. Calls `m.lock()`.
39
 
40
  ``` cpp
41
  lock_guard(mutex_type& m, adopt_lock_t);
42
  ```
43
 
44
- *Preconditions:* The calling thread owns the mutex `m`.
45
 
46
  *Effects:* Initializes `pm` with `m`.
47
 
48
  *Throws:* Nothing.
49
 
50
  ``` cpp
51
  ~lock_guard();
52
  ```
53
 
54
- *Effects:* As if by `pm.unlock()`.
55
 
 
30
 
31
  ``` cpp
32
  explicit lock_guard(mutex_type& m);
33
  ```
34
 
 
 
 
35
  *Effects:* Initializes `pm` with `m`. Calls `m.lock()`.
36
 
37
  ``` cpp
38
  lock_guard(mutex_type& m, adopt_lock_t);
39
  ```
40
 
41
+ *Preconditions:* The calling thread holds a non-shared lock on `m`.
42
 
43
  *Effects:* Initializes `pm` with `m`.
44
 
45
  *Throws:* Nothing.
46
 
47
  ``` cpp
48
  ~lock_guard();
49
  ```
50
 
51
+ *Effects:* Equivalent to: `pm.unlock()`
52