Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22216

'future' is not a member of 'std'

$
0
0

I would like to know why my compiler complains when I test the following code :

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

It gives: error: ‘future’ is not a member of ‘std’

I have gcc (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3.


Viewing all articles
Browse latest Browse all 22216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>