1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This test uses new symbols that were not defined in the libc++ shipped on
11 // darwin11 and darwin12:
12 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
13 // XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
14 // UNSUPPORTED: libcpp-has-no-monotonic-clock
15 
16 // <chrono>
17 
18 // steady_clock
19 
20 // check clock invariants
21 
22 #include <chrono>
23 
24 template <class _Tp>
test(const _Tp &)25 void test(const _Tp &) {}
26 
main()27 int main()
28 {
29     typedef std::chrono::steady_clock C;
30     static_assert((std::is_same<C::rep, C::duration::rep>::value), "");
31     static_assert((std::is_same<C::period, C::duration::period>::value), "");
32     static_assert((std::is_same<C::duration, C::time_point::duration>::value), "");
33     static_assert(C::is_steady, "");
34     test(std::chrono::steady_clock::is_steady);
35 }
36