1*58b9f456SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
2*58b9f456SAndroid Build Coastguard Worker //
3*58b9f456SAndroid Build Coastguard Worker // The LLVM Compiler Infrastructure
4*58b9f456SAndroid Build Coastguard Worker //
5*58b9f456SAndroid Build Coastguard Worker // This file is dual licensed under the MIT and the University of Illinois Open
6*58b9f456SAndroid Build Coastguard Worker // Source Licenses. See LICENSE.TXT for details.
7*58b9f456SAndroid Build Coastguard Worker //
8*58b9f456SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*58b9f456SAndroid Build Coastguard Worker // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
10*58b9f456SAndroid Build Coastguard Worker
11*58b9f456SAndroid Build Coastguard Worker // <chrono>
12*58b9f456SAndroid Build Coastguard Worker
13*58b9f456SAndroid Build Coastguard Worker // using weeks = duration<signed integer type of at least 22 bits, ratio_multiply<ratio<7>, days::period>>;
14*58b9f456SAndroid Build Coastguard Worker
15*58b9f456SAndroid Build Coastguard Worker #include <chrono>
16*58b9f456SAndroid Build Coastguard Worker #include <type_traits>
17*58b9f456SAndroid Build Coastguard Worker #include <limits>
18*58b9f456SAndroid Build Coastguard Worker
main()19*58b9f456SAndroid Build Coastguard Worker int main()
20*58b9f456SAndroid Build Coastguard Worker {
21*58b9f456SAndroid Build Coastguard Worker typedef std::chrono::weeks D;
22*58b9f456SAndroid Build Coastguard Worker typedef D::rep Rep;
23*58b9f456SAndroid Build Coastguard Worker typedef D::period Period;
24*58b9f456SAndroid Build Coastguard Worker static_assert(std::is_signed<Rep>::value, "");
25*58b9f456SAndroid Build Coastguard Worker static_assert(std::is_integral<Rep>::value, "");
26*58b9f456SAndroid Build Coastguard Worker static_assert(std::numeric_limits<Rep>::digits >= 22, "");
27*58b9f456SAndroid Build Coastguard Worker static_assert(std::is_same_v<Period, std::ratio_multiply<std::ratio<7>, std::chrono::days::period>>, "");
28*58b9f456SAndroid Build Coastguard Worker }
29