From Jason Turner

[thread.stoptoken.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpztybw233/{from.md → to.md} +29 -0
tmp/tmpztybw233/{from.md → to.md} RENAMED
@@ -1,9 +1,22 @@
1
  ### Header `<stop_token>` synopsis <a id="thread.stoptoken.syn">[[thread.stoptoken.syn]]</a>
2
 
3
  ``` cpp
4
  namespace std {
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  // [stoptoken], class stop_token
6
  class stop_token;
7
 
8
  // [stopsource], class stop_source
9
  class stop_source;
@@ -15,8 +28,24 @@ namespace std {
15
  inline constexpr nostopstate_t nostopstate{};
16
 
17
  // [stopcallback], class template stop_callback
18
  template<class Callback>
19
  class stop_callback;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
  ```
22
 
 
1
  ### Header `<stop_token>` synopsis <a id="thread.stoptoken.syn">[[thread.stoptoken.syn]]</a>
2
 
3
  ``` cpp
4
  namespace std {
5
+ // [stoptoken.concepts], stop token concepts
6
+ template<class CallbackFn, class Token, class Initializer = CallbackFn>
7
+ concept stoppable-callback-for = see below; // exposition only
8
+
9
+ template<class Token>
10
+ concept stoppable_token = see below;
11
+
12
+ template<class Token>
13
+ concept unstoppable_token = see below;
14
+
15
+ template<class Source>
16
+ concept stoppable-source = see below; // exposition only
17
+
18
  // [stoptoken], class stop_token
19
  class stop_token;
20
 
21
  // [stopsource], class stop_source
22
  class stop_source;
 
28
  inline constexpr nostopstate_t nostopstate{};
29
 
30
  // [stopcallback], class template stop_callback
31
  template<class Callback>
32
  class stop_callback;
33
+
34
+ // [stoptoken.never], class never_stop_token
35
+ class never_stop_token;
36
+
37
+ // [stoptoken.inplace], class inplace_stop_token
38
+ class inplace_stop_token;
39
+
40
+ // [stopsource.inplace], class inplace_stop_source
41
+ class inplace_stop_source;
42
+
43
+ // [stopcallback.inplace], class template inplace_stop_callback
44
+ template<class CallbackFn>
45
+ class inplace_stop_callback;
46
+
47
+ template<class T, class CallbackFn>
48
+ using stop_callback_for_t = T::template callback_type<CallbackFn>;
49
  }
50
  ```
51