Environment:
Windows 7
gcc version 4.8.2 (i686-posix-dwarf-rev3, Built by MinGW-W64 project)
GNU ld (GNU Binutils) 2.24
Command line call:
g++ -std=c++11 futures.cpp
The program crashes in some cases, but not always. I observe two different kinds of crashes: It either terminates with "This application has requested the runtime to terminate it in an unusual way." Or, it terminates after throwing an instance of 'std::future_error', what(): Promise already satisfied.
I use MinGW-gw64 provided as part of the Qt project (5.3.2).
Cannot reproduce the problem with a more recent version (gcc 4.9.1, MinGW-W64)