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 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
11 //
12 // TODO: Remove this when filesystem gets integrated into the dylib
13 // REQUIRES: c++filesystem
14
15 // <chrono>
16
17 // file_clock
18
19 // check clock invariants
20
21 #include <chrono>
22
23 template <class T>
test(const T &)24 void test(const T &) {}
25
main()26 int main()
27 {
28 typedef std::chrono::file_clock C;
29 static_assert((std::is_same<C::rep, C::duration::rep>::value), "");
30 static_assert((std::is_same<C::period, C::duration::period>::value), "");
31 static_assert((std::is_same<C::duration, C::time_point::duration>::value), "");
32 static_assert((std::is_same<C::time_point::clock, C>::value), "");
33 static_assert(!C::is_steady, "");
34 test(std::chrono::file_clock::is_steady);
35 }
36