std::unstoppable_token
出自cppreference.com
並發支持庫
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 在標頭 <stop_token> 定義
|
||
template< class Token >
concept unstoppable_token =
std::stoppable_token<Token> &&
requires (const Token tok) {
requires std::bool_constant<(!tok.stop_possible())>::value;
};
|
(C++26 起) | |
概念 unstoppable_token<Token> 為 stoppable_token 指定額外的要求,其類型不允許停止。即表達式 tok.stop_possible() 必須可用在常量表達式中並返回 false。