|
534 | 534 | class stop_source; |
535 | 535 |
|
536 | 536 | // no-shared-stop-state indicator |
537 | | - struct nostopstate_t { |
| 537 | + struct @\libglobal{nostopstate_t}@ { |
538 | 538 | explicit nostopstate_t() = default; |
539 | 539 | }; |
540 | | - inline constexpr nostopstate_t nostopstate{}; |
| 540 | + inline constexpr nostopstate_t @\libglobal{nostopstate}@{}; |
541 | 541 |
|
542 | 542 | // \ref{stopcallback}, class template \tcode{stop_callback} |
543 | 543 | template<class Callback> |
|
557 | 557 | class inplace_stop_callback; |
558 | 558 |
|
559 | 559 | template<class T, class CallbackFn> |
560 | | - using stop_callback_for_t = T::template callback_type<CallbackFn>; |
| 560 | + using @\libglobal{stop_callback_for_t}@ = T::template callback_type<CallbackFn>; |
561 | 561 | } |
562 | 562 | \end{codeblock} |
563 | 563 |
|
|
835 | 835 | class stop_token { |
836 | 836 | public: |
837 | 837 | template<class CallbackFn> |
838 | | - using callback_type = stop_callback<CallbackFn>; |
| 838 | + using @\libmember{callback_type}{stop_token}@ = stop_callback<CallbackFn>; |
839 | 839 |
|
840 | 840 | stop_token() noexcept = default; |
841 | 841 |
|
|
1043 | 1043 | template<class CallbackFn> |
1044 | 1044 | class stop_callback { |
1045 | 1045 | public: |
1046 | | - using callback_type = CallbackFn; |
| 1046 | + using @\libmember{callback_type}{stop_callback}@ = CallbackFn; |
1047 | 1047 |
|
1048 | 1048 | // \ref{stopcallback.cons}, constructors and destructor |
1049 | 1049 | template<class Initializer> |
|
1133 | 1133 | It provides a stop token interface, |
1134 | 1134 | but also provides static information |
1135 | 1135 | that a stop is never possible nor requested. |
| 1136 | +\indexlibraryglobal{never_stop_token}% |
1136 | 1137 | \begin{codeblock} |
1137 | 1138 | namespace std { |
1138 | 1139 | class never_stop_token { |
|
1141 | 1142 | }; |
1142 | 1143 | public: |
1143 | 1144 | template<class> |
1144 | | - using callback_type = @\exposid{callback-type}@; |
| 1145 | + using @\libmember{callback_type}{never_stop_token}@ = @\exposid{callback-type}@; |
1145 | 1146 |
|
1146 | | - static constexpr bool stop_requested() noexcept { return false; } |
1147 | | - static constexpr bool stop_possible() noexcept { return false; } |
| 1147 | + static constexpr bool @\libmember{stop_requested}{never_stop_token}@() noexcept { return false; } |
| 1148 | + static constexpr bool @\libmember{stop_possible}{never_stop_token}@() noexcept { return false; } |
1148 | 1149 |
|
1149 | 1150 | bool operator==(const never_stop_token&) const = default; |
1150 | 1151 | }; |
|
1161 | 1162 | It references the stop state of |
1162 | 1163 | its associated \tcode{inplace_stop_source} object\iref{stopsource.inplace}, |
1163 | 1164 | if any. |
| 1165 | +\indexlibraryglobal{inplace_stop_token}% |
1164 | 1166 | \begin{codeblock} |
1165 | 1167 | namespace std { |
1166 | 1168 | class inplace_stop_token { |
1167 | 1169 | public: |
1168 | 1170 | template<class CallbackFn> |
1169 | | - using callback_type = inplace_stop_callback<CallbackFn>; |
| 1171 | + using @\libmember{callback_type}{inplace_stop_token}@ = inplace_stop_callback<CallbackFn>; |
1170 | 1172 |
|
1171 | 1173 | inplace_stop_token() = default; |
1172 | 1174 | bool operator==(const inplace_stop_token&) const = default; |
|
1184 | 1186 |
|
1185 | 1187 | \rSec3[stoptoken.inplace.mem]{Member functions} |
1186 | 1188 |
|
| 1189 | +\indexlibrarymember{swap}{inplace_stop_token}% |
1187 | 1190 | \begin{itemdecl} |
1188 | 1191 | void swap(inplace_stop_token& rhs) noexcept; |
1189 | 1192 | \end{itemdecl} |
|
1194 | 1197 | Exchanges the values of \exposid{stop-source} and \tcode{rhs.\exposid{stop-source}}. |
1195 | 1198 | \end{itemdescr} |
1196 | 1199 |
|
| 1200 | +\indexlibrarymember{stop_requested}{inplace_stop_token}% |
1197 | 1201 | \begin{itemdecl} |
1198 | 1202 | bool stop_requested() const noexcept; |
1199 | 1203 | \end{itemdecl} |
|
1215 | 1219 | \end{note} |
1216 | 1220 | \end{itemdescr} |
1217 | 1221 |
|
| 1222 | +\indexlibrarymember{stop_possible}{inplace_stop_token}% |
1218 | 1223 | \begin{itemdecl} |
1219 | 1224 | stop_possible() const noexcept; |
1220 | 1225 | \end{itemdecl} |
|
1241 | 1246 | \pnum |
1242 | 1247 | The class \tcode{inplace_stop_source} models \exposconcept{stoppable-source}. |
1243 | 1248 |
|
| 1249 | +\indexlibraryglobal{inplace_stop_source}% |
1244 | 1250 | \begin{codeblock} |
1245 | 1251 | namespace std { |
1246 | 1252 | class inplace_stop_source { |
|
1256 | 1262 |
|
1257 | 1263 | // \ref{stopsource.inplace.mem}, stop handling |
1258 | 1264 | constexpr inplace_stop_token get_token() const noexcept; |
1259 | | - static constexpr bool stop_possible() noexcept { return true; } |
| 1265 | + static constexpr bool @\libmember{stop_possible}{inplace_stop_source}@() noexcept { return true; } |
1260 | 1266 | bool stop_requested() const noexcept; |
1261 | 1267 | bool request_stop() noexcept; |
1262 | 1268 | }; |
|
1265 | 1271 |
|
1266 | 1272 | \rSec3[stopsource.inplace.cons]{Constructors} |
1267 | 1273 |
|
| 1274 | +\indexlibraryctor{inplace_stop_source}% |
1268 | 1275 | \begin{itemdecl} |
1269 | 1276 | constexpr inplace_stop_source() noexcept; |
1270 | 1277 | \end{itemdecl} |
|
1281 | 1288 |
|
1282 | 1289 | \rSec3[stopsource.inplace.mem]{Member functions} |
1283 | 1290 |
|
| 1291 | +\indexlibrarymember{get_token}{inplace_stop_source}% |
1284 | 1292 | \begin{itemdecl} |
1285 | 1293 | constexpr inplace_stop_token get_token() const noexcept; |
1286 | 1294 | \end{itemdecl} |
|
1292 | 1300 | whose \exposid{stop-source} member is equal to \tcode{this}. |
1293 | 1301 | \end{itemdescr} |
1294 | 1302 |
|
| 1303 | +\indexlibrarymember{stop_requested}{inplace_stop_source}% |
1295 | 1304 | \begin{itemdecl} |
1296 | 1305 | bool stop_requested() const noexcept; |
1297 | 1306 | \end{itemdecl} |
|
1303 | 1312 | has received a stop request; otherwise, \tcode{false}. |
1304 | 1313 | \end{itemdescr} |
1305 | 1314 |
|
| 1315 | +\indexlibrarymember{request_stop}{inplace_stop_source}% |
1306 | 1316 | \begin{itemdecl} |
1307 | 1317 | bool request_stop() noexcept; |
1308 | 1318 | \end{itemdecl} |
|
1321 | 1331 |
|
1322 | 1332 | \rSec3[stopcallback.inplace.general]{General} |
1323 | 1333 |
|
| 1334 | +\indexlibraryglobal{inplace_stop_callback}% |
1324 | 1335 | \begin{codeblock} |
1325 | 1336 | namespace std { |
1326 | 1337 | template<class CallbackFn> |
1327 | 1338 | class inplace_stop_callback { |
1328 | 1339 | public: |
1329 | | - using callback_type = CallbackFn; |
| 1340 | + using @\libmember{callback_type}{inplace_stop_callback}@ = CallbackFn; |
1330 | 1341 |
|
1331 | 1342 | // \ref{stopcallback.inplace.cons}, constructors and destructor |
1332 | 1343 | template<class Initializer> |
|
1371 | 1382 |
|
1372 | 1383 | \rSec3[stopcallback.inplace.cons]{Constructors and destructor} |
1373 | 1384 |
|
| 1385 | +\indexlibraryctor{inplace_stop_callback}% |
1374 | 1386 | \begin{itemdecl} |
1375 | 1387 | template<class Initializer> |
1376 | 1388 | explicit inplace_stop_callback(inplace_stop_token st, Initializer&& init) |
|
1388 | 1400 | and executes a stoppable callback registration\iref{stoptoken.concepts}. |
1389 | 1401 | \end{itemdescr} |
1390 | 1402 |
|
| 1403 | +\indexlibrarydtor{inplace_stop_callback}% |
1391 | 1404 | \begin{itemdecl} |
1392 | 1405 | ~inplace_stop_callback(); |
1393 | 1406 | \end{itemdecl} |
|
0 commit comments