blob: ded1c22fe14f9180c60a7340c6f23fa6aa0adf49 [file] [log] [blame]
Howard Hinnant94b2dd02010-08-22 00:59:46 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Howard Hinnant94b2dd02010-08-22 00:59:46 +00006//
7//===----------------------------------------------------------------------===//
8
9// <chrono>
10
11// typedef duration<signed integral type of at least 55 bits, micro> microseconds;
12
13#include <chrono>
14#include <type_traits>
15#include <limits>
16
JF Bastien2df59c52019-02-04 20:31:13 +000017int main(int, char**)
Howard Hinnant94b2dd02010-08-22 00:59:46 +000018{
19 typedef std::chrono::microseconds D;
20 typedef D::rep Rep;
21 typedef D::period Period;
22 static_assert(std::is_signed<Rep>::value, "");
23 static_assert(std::is_integral<Rep>::value, "");
24 static_assert(std::numeric_limits<Rep>::digits >= 54, "");
25 static_assert((std::is_same<Period, std::micro>::value), "");
JF Bastien2df59c52019-02-04 20:31:13 +000026
27 return 0;
Howard Hinnant94b2dd02010-08-22 00:59:46 +000028}