#include <iostream> #include <chrono> #include <future> using namespace std; void sample(void) { cout << "sample" << endl; } int main() { auto f = async(sample); f.get(); return 0; }
Standard input is empty
Standard output is empty
terminate called after throwing an instance of 'std::system_error' what(): Unknown error 4294967295