Commit 0f06d78e authored by Davis King's avatar Davis King

Add guard so code compiles in old compilers.

parent d635a7ee
......@@ -21,6 +21,7 @@ namespace
void test_async()
{
#if __cplusplus >= 201103
print_spinner();
auto v1 = dlib::async([]() { dlib::sleep(500); return 1; }).share();
auto v2 = dlib::async([v1]() { dlib::sleep(400); return v1.get()+1; }).share();
......@@ -42,6 +43,7 @@ namespace
DLIB_TEST(e.what() == string("oops"));
}
DLIB_TEST(got_exception);
#endif
}
class threads_tester : public tester
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment