Debian Codegraph @

libstdc++-v3/testsuite/30_threads/future/members/118093.cc

raw
1 // { dg-do run { target c++11 } }
2
3 #include <chrono>
4 #include <future>
5
6 void
7 test_sys()
8 {
9 std::promise<void> p;
10 std::chrono::system_clock::time_point tp(std::chrono::milliseconds{-10});
11 (void) p.get_future().wait_until(tp);
12 }
13
14 void
15 test_steady()
16 {
17 std::promise<void> p;
18 std::chrono::steady_clock::time_point tp(std::chrono::milliseconds{-10});
19 (void) p.get_future().wait_until(tp);
20 }
21
22 int main()
23 {
24 test_sys();
25 test_steady();
26 }