首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

C++11 'yield' is not a member of 'std:this_thread'

2013-01-06 
C++11 yield is not a member of std::this_thread原因:GCC没有定义这个宏:_GLIBCXX_USE_SCHED_YIELD解决

C++11 'yield' is not a member of 'std::this_thread'

原因:GCC没有定义这个宏:_GLIBCXX_USE_SCHED_YIELD

解决办法:编译时加上选项:-D_GLIBCXX_USE_SCHED_YIELD

或者:长远打算修改gcc的c++config.h文件去定义这个宏。

详情:'yield' is not a member of 'std::this_thread'  

see also: C++11 error: ‘sleep_for’ is not a member of ‘std::this_thread’

热点排行