Howard Hinnant | c52f43e | 2010-08-22 00:59:46 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <chrono> |
| 11 | |
| 12 | // typedef duration<signed integral type of at least 64 bits, nano> nanoseconds; |
| 13 | |
| 14 | #include <chrono> |
| 15 | #include <type_traits> |
| 16 | #include <limits> |
| 17 | |
| 18 | int main() |
| 19 | { |
| 20 | typedef std::chrono::nanoseconds D; |
| 21 | typedef D::rep Rep; |
| 22 | typedef D::period Period; |
| 23 | static_assert(std::is_signed<Rep>::value, ""); |
| 24 | static_assert(std::is_integral<Rep>::value, ""); |
| 25 | static_assert(std::numeric_limits<Rep>::digits >= 63, ""); |
| 26 | static_assert((std::is_same<Period, std::nano>::value), ""); |
| 27 | } |