blob: ca21ace5d19c5bdf62c9af0f8092939e2e469d72 [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
Marshall Clow7fc6a552019-05-31 18:35:30 +000017#include "test_macros.h"
18
JF Bastien2df59c52019-02-04 20:31:13 +000019int main(int, char**)
Howard Hinnant94b2dd02010-08-22 00:59:46 +000020{
21 typedef std::chrono::microseconds D;
22 typedef D::rep Rep;
23 typedef D::period Period;
24 static_assert(std::is_signed<Rep>::value, "");
25 static_assert(std::is_integral<Rep>::value, "");
26 static_assert(std::numeric_limits<Rep>::digits >= 54, "");
27 static_assert((std::is_same<Period, std::micro>::value), "");
JF Bastien2df59c52019-02-04 20:31:13 +000028
29 return 0;
Howard Hinnant94b2dd02010-08-22 00:59:46 +000030}