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 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
10 
11 // <chrono>
12 
13 // using months = duration<signed integer type of at least 20 bits, ratio_divide<years::period, ratio<12>>>;
14 
15 
16 #include <chrono>
17 #include <type_traits>
18 #include <limits>
19 
main()20 int main()
21 {
22     typedef std::chrono::months D;
23     typedef D::rep Rep;
24     typedef D::period Period;
25     static_assert(std::is_signed<Rep>::value, "");
26     static_assert(std::is_integral<Rep>::value, "");
27     static_assert(std::numeric_limits<Rep>::digits >= 20, "");
28     static_assert(std::is_same_v<Period, std::ratio_divide<std::chrono::years::period, std::ratio<12>>>, "");
29 }
30