- 博客(1)
- 收藏
- 关注
原创 C++:关于出现static assertion failed: std::thread arguments must be invocable after conversion to rvalues
C++thread库的构造函数只能以复制的值传递形式传递参数,因此,以引用形式传递参数会报错,解决办法:在传递的参数前加是std::ref();std::thread t(func, std::ref(param));
2021-12-14 18:07:44
7469
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人