Revert commit r347904 because it broke older compilers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347908 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
/*
|
||||
<limits>:
|
||||
numeric_limits
|
||||
@@ -101,14 +99,6 @@ int main()
|
||||
TEST_NUMERIC_LIMITS(volatile wchar_t)
|
||||
TEST_NUMERIC_LIMITS(const volatile wchar_t)
|
||||
|
||||
#if TEST_STD_VER > 17
|
||||
// char8_t
|
||||
TEST_NUMERIC_LIMITS(char8_t)
|
||||
TEST_NUMERIC_LIMITS(const char8_t)
|
||||
TEST_NUMERIC_LIMITS(volatile char8_t)
|
||||
TEST_NUMERIC_LIMITS(const volatile char8_t)
|
||||
#endif
|
||||
|
||||
// char16_t
|
||||
TEST_NUMERIC_LIMITS(char16_t)
|
||||
TEST_NUMERIC_LIMITS(const char16_t)
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -34,9 +32,6 @@ int main()
|
||||
test<signed char>(0);
|
||||
test<unsigned char>(0);
|
||||
test<wchar_t>(0);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 7>();
|
||||
test<unsigned char, 8>();
|
||||
test<wchar_t, std::numeric_limits<wchar_t>::is_signed ? sizeof(wchar_t)*8-1 : sizeof(wchar_t)*8>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 8>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 16>();
|
||||
test<char32_t, 32>();
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -37,9 +35,6 @@ int main()
|
||||
test<signed char, 2>();
|
||||
test<unsigned char, 2>();
|
||||
test<wchar_t, 5*sizeof(wchar_t)/2-1>(); // 4 -> 9 and 2 -> 4
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 2>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 4>();
|
||||
test<char32_t, 9>();
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -34,9 +32,6 @@ int main()
|
||||
test<signed char>(0);
|
||||
test<unsigned char>(0);
|
||||
test<wchar_t>(0);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, std::float_denorm_style expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, std::denorm_absent>();
|
||||
test<unsigned char, std::denorm_absent>();
|
||||
test<wchar_t, std::denorm_absent>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, std::denorm_absent>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, std::denorm_absent>();
|
||||
test<char32_t, std::denorm_absent>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, false>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, false>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, false>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, false>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -36,9 +34,6 @@ int main()
|
||||
test<signed char>(0);
|
||||
test<unsigned char>(0);
|
||||
test<wchar_t>(0);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, true>();
|
||||
test<unsigned char, true>();
|
||||
test<wchar_t, true>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, true>();
|
||||
test<unsigned char, true>();
|
||||
test<wchar_t, true>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, false>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, true>();
|
||||
test<unsigned char, true>();
|
||||
test<wchar_t, true>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, true>();
|
||||
// test<wchar_t, false>(); // don't know
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, true>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, wchar_t(-1) < wchar_t(0)>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -40,9 +38,6 @@ int main()
|
||||
test<signed char>(SCHAR_MIN);
|
||||
test<unsigned char>(0);
|
||||
test<wchar_t>(WCHAR_MIN);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -40,9 +38,6 @@ int main()
|
||||
test<signed char>(SCHAR_MAX);
|
||||
test<unsigned char>(UCHAR_MAX);
|
||||
test<wchar_t>(WCHAR_MAX);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(UCHAR_MAX); // ??
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(USHRT_MAX);
|
||||
test<char32_t>(UINT_MAX);
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 0>();
|
||||
test<unsigned char, 0>();
|
||||
test<wchar_t, 0>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 0>();
|
||||
test<unsigned char, 0>();
|
||||
test<wchar_t, 0>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 0>();
|
||||
test<unsigned char, 0>();
|
||||
test<wchar_t, 0>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -40,9 +38,6 @@ int main()
|
||||
test<signed char>(SCHAR_MIN);
|
||||
test<unsigned char>(0);
|
||||
test<wchar_t>(WCHAR_MIN);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 0>();
|
||||
test<unsigned char, 0>();
|
||||
test<wchar_t, 0>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 0>();
|
||||
test<unsigned char, 0>();
|
||||
test<wchar_t, 0>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test_imp(std::true_type)
|
||||
@@ -53,9 +51,6 @@ int main()
|
||||
test<signed char>();
|
||||
test<unsigned char>();
|
||||
test<wchar_t>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <limits>
|
||||
#include <cfloat>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, int expected>
|
||||
void
|
||||
test()
|
||||
@@ -33,9 +31,6 @@ int main()
|
||||
test<signed char, 2>();
|
||||
test<unsigned char, 2>();
|
||||
test<wchar_t, 2>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, 2>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 2>();
|
||||
test<char32_t, 2>();
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include <cfloat>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test(T expected)
|
||||
@@ -34,9 +32,6 @@ int main()
|
||||
test<signed char>(0);
|
||||
test<unsigned char>(0);
|
||||
test<wchar_t>(0);
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, std::float_round_style expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, std::round_toward_zero>();
|
||||
test<unsigned char, std::round_toward_zero>();
|
||||
test<wchar_t, std::round_toward_zero>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, std::round_toward_zero>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, std::round_toward_zero>();
|
||||
test<char32_t, std::round_toward_zero>();
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test_imp(std::true_type)
|
||||
@@ -53,9 +51,6 @@ int main()
|
||||
test<signed char>();
|
||||
test<unsigned char>();
|
||||
test<wchar_t>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@@ -32,9 +30,6 @@ int main()
|
||||
test<signed char, false>();
|
||||
test<unsigned char, false>();
|
||||
test<wchar_t, false>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
|
||||
defined(__wasm__)
|
||||
static const bool integral_types_trap = true;
|
||||
@@ -39,9 +37,6 @@ int main()
|
||||
test<signed char, integral_types_trap>();
|
||||
test<unsigned char, integral_types_trap>();
|
||||
test<wchar_t, integral_types_trap>();
|
||||
#if TEST_STD_VER > 17
|
||||
test<char8_t, integral_types_trap>();
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, integral_types_trap>();
|
||||
test<char32_t, integral_types_trap>();
|
||||
|
||||
Reference in New Issue
Block a user