报错error: no matching function for call to 'std::thread::thread

[复制链接]
 楼主| keer_zu 发表于 2023-4-13 17:00 | 显示全部楼层 |阅读模式
C++11中,使用std::thread传递函数的要点,需要加上所属Class

报错:

error: no matching function for call to 'std::thread::thread(<unresolved overloaded function type>, ThreadsTemp&)'
             threads.push_back(std::thread(ThreadsFeatureMatch, tt));




解决方案:

threads.push_back(std::thread(&va_mcs_demo::ThreadsFeatureMatch, this,tt));


您需要登录后才可以回帖 登录 | 注册

本版积分规则

1478

主题

12917

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部

1478

主题

12917

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部