]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
Vendor import of libc++ trunk r300422:
[FreeBSD/FreeBSD.git] / test / std / experimental / filesystem / fs.filesystem.synopsis / file_time_type.pass.cpp
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
11
12 // <experimental/filesystem>
13
14 // typedef TrivialClock file_time_type;
15
16 #include <experimental/filesystem>
17 #include <chrono>
18 #include <type_traits>
19
20 // system_clock is used because it meets the requirements of TrivialClock,
21 // and the resolution and range of system_clock should match the operating
22 // system's file time type.
23 typedef std::chrono::system_clock              ExpectedClock;
24 typedef std::chrono::time_point<ExpectedClock> ExpectedTimePoint;
25
26 int main() {
27   static_assert(std::is_same<
28           std::experimental::filesystem::file_time_type,
29           ExpectedTimePoint
30       >::value, "");
31 }