I was trying to run the test code for the future
class on Windows but I had several problems. First I tried using the default compiler of Code::Blocks which in my case is MinGW 4.7.1 obtaining the error
error: variable 'std::future<bool> fut' has initializer but incomplete type|
As suggested in this question it seems that
No one has provided the necessary code to make the C++11 thread features work on Windows yet.
Since the question was from 2012 I gave it a try with more recent compilers. I had no luck using both MinGW 4.8.1 and MinGW 5.1
Surprisingly, when I tried the default compiler for Qt Creator which in my case is MinGW 4.9.1 it worked fine.
How is this possible?