//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // test numeric_limits // digits #include #include template void test() { static_assert(std::numeric_limits::digits == expected, "digits test 1"); static_assert(std::numeric_limits::digits == expected, "digits test 2"); static_assert(std::numeric_limits::digits == expected, "digits test 3"); static_assert(std::numeric_limits::digits == expected, "digits test 4"); } int main() { test(); test::is_signed ? 7 : 8>(); test(); test(); test::is_signed ? sizeof(wchar_t)*8-1 : sizeof(wchar_t)*8>(); #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS test(); test(); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); }