From Jason Turner

[thread.thread.constr]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5gqu46v7/{from.md → to.md} +13 -10
tmp/tmp5gqu46v7/{from.md → to.md} RENAMED
@@ -5,34 +5,37 @@ thread() noexcept;
5
  ```
6
 
7
  *Effects:* Constructs a `thread` object that does not represent a thread
8
  of execution.
9
 
10
- `get_id() == id()`
11
 
12
  ``` cpp
13
  template <class F, class... Args> explicit thread(F&& f, Args&&... args);
14
  ```
15
 
16
  *Requires:*  `F` and each `Ti` in `Args` shall satisfy the
17
- `MoveConstructible` requirements. *`INVOKE`*`(`*`DECAY_COPY`*`(`
18
- `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)` ([[func.require]])
19
  shall be a valid expression.
20
 
21
  *Remarks:* This constructor shall not participate in overload resolution
22
  if `decay_t<F>` is the same type as `std::thread`.
23
 
24
  *Effects:*  Constructs an object of type `thread`. The new thread of
25
  execution executes
26
- *`INVOKE`*`(`*`DECAY_COPY`*`(` `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)`
27
  with the calls to *`DECAY_COPY`* being evaluated in the constructing
28
- thread. Any return value from this invocation is ignored. This implies
29
- that any exceptions not thrown from the invocation of the copy of `f`
30
- will be thrown in the constructing thread, not the new thread. If the
31
- invocation of *`INVOKE`*`(`*`DECAY_COPY`*`(`
32
- `std::forward<F>(f)), `*`DECAY_COPY`*`(std::forward<Args>(args))...)`
33
- terminates with an uncaught exception, `std::terminate` shall be called.
 
 
 
34
 
35
  *Synchronization:* The completion of the invocation of the constructor
36
  synchronizes with the beginning of the invocation of the copy of `f`.
37
 
38
  *Postconditions:* `get_id() != id()`. `*this` represents the newly
 
5
  ```
6
 
7
  *Effects:* Constructs a `thread` object that does not represent a thread
8
  of execution.
9
 
10
+ *Postconditions:* `get_id() == id()`.
11
 
12
  ``` cpp
13
  template <class F, class... Args> explicit thread(F&& f, Args&&... args);
14
  ```
15
 
16
  *Requires:*  `F` and each `Ti` in `Args` shall satisfy the
17
+ `MoveConstructible` requirements.
18
+ ` `*`INVOKE`*`( `*`DECAY_COPY`*`( std::forward<F>(f)), `*`DECAY_COPY`*`( std::forward<Args>(args))...)` ([[func.require]])
19
  shall be a valid expression.
20
 
21
  *Remarks:* This constructor shall not participate in overload resolution
22
  if `decay_t<F>` is the same type as `std::thread`.
23
 
24
  *Effects:*  Constructs an object of type `thread`. The new thread of
25
  execution executes
26
+ ` `*`INVOKE`*`( `*`DECAY_COPY`*`( std::forward<F>(f)), `*`DECAY_COPY`*`( std::forward<Args>(args))...)`
27
  with the calls to *`DECAY_COPY`* being evaluated in the constructing
28
+ thread. Any return value from this invocation is ignored.
29
+
30
+ [*Note 1*: This implies that any exceptions not thrown from the
31
+ invocation of the copy of `f` will be thrown in the constructing thread,
32
+ not the new thread. — *end note*]
33
+
34
+ If the invocation of
35
+ ` `*`INVOKE`*`( `*`DECAY_COPY`*`( std::forward<F>(f)), `*`DECAY_COPY`*`( std::forward<Args>(args))...)`
36
+ terminates with an uncaught exception, `terminate` shall be called.
37
 
38
  *Synchronization:* The completion of the invocation of the constructor
39
  synchronizes with the beginning of the invocation of the copy of `f`.
40
 
41
  *Postconditions:* `get_id() != id()`. `*this` represents the newly