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 10 // <chrono> 11 12 // duration_values::max 13 14 #include <chrono> 15 #include <limits> 16 #include <cassert> 17 18 #include "../../rep.h" 19 main()20int main() 21 { 22 assert(std::chrono::duration_values<int>::max() == 23 std::numeric_limits<int>::max()); 24 assert(std::chrono::duration_values<double>::max() == 25 std::numeric_limits<double>::max()); 26 assert(std::chrono::duration_values<Rep>::max() == 27 std::numeric_limits<Rep>::max()); 28 #ifndef _LIBCPP_HAS_NO_CONSTEXPR 29 static_assert(std::chrono::duration_values<int>::max() == 30 std::numeric_limits<int>::max(), ""); 31 static_assert(std::chrono::duration_values<double>::max() == 32 std::numeric_limits<double>::max(), ""); 33 static_assert(std::chrono::duration_values<Rep>::max() == 34 std::numeric_limits<Rep>::max(), ""); 35 #endif 36 } 37