1. 首页
  2. 数据库
  3. 其它
  4. jthread lite:单文件标头库中的C ++ 20的C ++ 11和更高版本的jthread 源码

jthread lite:单文件标头库中的C ++ 20的C ++ 11和更高版本的jthread 源码

上传者: 2021-05-05 09:47:54上传 ZIP文件 37.01KB 热度 13次
jthread lite:C ++ 20的jthread(用于C ++ 11和更高版本) 婴儿期的作品。 彼得·费瑟斯通(Peter Featherstone)建议。 内容 用法示例 # include " nonstd/jthread.hpp " # include int main ( int argc, char **) { int product = 0 ; const int six = 6 ; const int seven = 7 ; { nonstd::jthread thr{[&]( int x, int y){ product = x * y; }, six, seven }; // automatically join thread here, making sure it
下载地址
用户评论