小编use*_*527的帖子

'未来'不是'std'的成员

我想知道为什么我的编译器在测试以下代码时会抱怨:

int main(int argc, char**) {    
...
std::future<int> result( std::async([](int m, int n) { return m + n;} , 2, 4));
...
return 0;
}
Run Code Online (Sandbox Code Playgroud)

它给出:错误:'future'不是'std'的成员

我有gcc(Ubuntu/Linaro 4.7.3-2ubuntu1~12.04)4.7.3.

谢谢!

c++ compiler-construction gcc g++ c++11

-1
推荐指数
1
解决办法
1602
查看次数

标签 统计

c++ ×1

c++11 ×1

compiler-construction ×1

g++ ×1

gcc ×1