forked from OSchip/llvm-project
[libc++] Remove macros for IBM compiler
It's not tested or used anymore -- instead a Clang-based compiler is used on IBM nowadays. Differential Revision: https://reviews.llvm.org/D127650
This commit is contained in:
parent
81e890057d
commit
ee78181f34
|
@ -206,8 +206,6 @@
|
|||
# define _LIBCPP_COMPILER_GCC
|
||||
# elif defined(_MSC_VER)
|
||||
# define _LIBCPP_COMPILER_MSVC
|
||||
# elif defined(__IBMCPP__)
|
||||
# define _LIBCPP_COMPILER_IBM
|
||||
# endif
|
||||
|
||||
# if defined(_LIBCPP_COMPILER_GCC) && __cplusplus < 201103L
|
||||
|
@ -510,28 +508,7 @@ typedef __char32_t char32_t;
|
|||
|
||||
# define _LIBCPP_DISABLE_EXTENSION_WARNING
|
||||
|
||||
# elif defined(_LIBCPP_COMPILER_IBM)
|
||||
|
||||
# define _ALIGNAS(x) __attribute__((__aligned__(x)))
|
||||
# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(_LIBCPP_ALIGNOF(x))))
|
||||
# define _ATTRIBUTE(x) __attribute__((x))
|
||||
# define _LIBCPP_NORETURN __attribute__((noreturn))
|
||||
|
||||
# define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
|
||||
# if defined(_AIX)
|
||||
# define __MULTILOCALE_API
|
||||
# endif
|
||||
|
||||
# define _LIBCPP_HAS_NO_ASAN
|
||||
|
||||
# define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
|
||||
|
||||
# define _LIBCPP_HAS_NO_VECTOR_EXTENSION
|
||||
|
||||
# define _LIBCPP_DISABLE_EXTENSION_WARNING
|
||||
|
||||
# endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM]
|
||||
# endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC]
|
||||
|
||||
# if defined(_LIBCPP_OBJECT_FORMAT_COFF)
|
||||
|
||||
|
@ -747,11 +724,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
|
|||
# define _NOEXCEPT_(x)
|
||||
# endif
|
||||
|
||||
# ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef unsigned short char16_t;
|
||||
typedef unsigned int char32_t;
|
||||
# endif
|
||||
|
||||
# ifndef __SIZEOF_INT128__
|
||||
# define _LIBCPP_HAS_NO_INT128
|
||||
# endif
|
||||
|
|
|
@ -525,8 +525,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
|
|||
};
|
||||
#endif // !_LIBCPP_HAS_NO_CHAR8_T
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
template <>
|
||||
struct _LIBCPP_TEMPLATE_VIS hash<char16_t>
|
||||
|
@ -559,8 +557,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
|
|||
size_t operator()(char32_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
template <>
|
||||
|
|
|
@ -516,8 +516,6 @@ char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __
|
|||
|
||||
#endif // _LIBCPP_HAS_NO_CHAR8_T
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
|
||||
template <>
|
||||
struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
|
||||
{
|
||||
|
@ -698,8 +696,6 @@ char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& _
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
|
||||
// helper fns for basic_string and string_view
|
||||
|
||||
// __str_find
|
||||
|
|
|
@ -30,10 +30,8 @@ template <> struct __libcpp_is_integral<wchar_t> { enum { va
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
template <> struct __libcpp_is_integral<char8_t> { enum { value = 1 }; };
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
template <> struct __libcpp_is_integral<char16_t> { enum { value = 1 }; };
|
||||
template <> struct __libcpp_is_integral<char32_t> { enum { value = 1 }; };
|
||||
#endif
|
||||
template <> struct __libcpp_is_integral<short> { enum { value = 1 }; };
|
||||
template <> struct __libcpp_is_integral<unsigned short> { enum { value = 1 }; };
|
||||
template <> struct __libcpp_is_integral<int> { enum { value = 1 }; };
|
||||
|
|
|
@ -30,13 +30,10 @@ struct _IsSameAsAny : _Or<_IsSame<_Tp, _Up>...> {};
|
|||
|
||||
template<class _Tp>
|
||||
concept __is_safe_integral_cmp = is_integral_v<_Tp> &&
|
||||
!_IsSameAsAny<_Tp, bool, char
|
||||
!_IsSameAsAny<_Tp, bool, char, char16_t, char32_t
|
||||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
, char8_t
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
, char16_t, char32_t
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
|
||||
, wchar_t
|
||||
#endif
|
||||
|
|
|
@ -232,10 +232,8 @@ typedef fpos<mbstate_t> wstreampos;
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
typedef fpos<mbstate_t> u8streampos;
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef fpos<mbstate_t> u16streampos;
|
||||
typedef fpos<mbstate_t> u32streampos;
|
||||
#endif
|
||||
|
||||
#if defined(_NEWLIB_VERSION)
|
||||
// On newlib, off_t is 'long int'
|
||||
|
|
|
@ -540,6 +540,7 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
|
|||
#include <__utility/unreachable.h>
|
||||
#include <climits>
|
||||
#include <compare>
|
||||
#include <cstdint>
|
||||
#include <cstdio> // EOF
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
@ -557,10 +558,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
|
|||
# include <cwchar>
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
# include <cstdint>
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
@ -621,11 +618,8 @@ struct __can_be_converted_to_string_view : public _BoolConstant<
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
typedef basic_string<char8_t> u8string;
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef basic_string<char16_t> u16string;
|
||||
typedef basic_string<char32_t> u32string;
|
||||
#endif
|
||||
|
||||
struct __uninitialized_size_tag {};
|
||||
|
||||
|
@ -635,10 +629,8 @@ class
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
_LIBCPP_PREFERRED_NAME(u8string)
|
||||
#endif
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
_LIBCPP_PREFERRED_NAME(u16string)
|
||||
_LIBCPP_PREFERRED_NAME(u32string)
|
||||
#endif
|
||||
basic_string
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -34,12 +34,10 @@ void full_size() {
|
|||
assert(wstr.max_size() == std::numeric_limits<size_t>::max() / sizeof(wchar_t) - alignment);
|
||||
#endif
|
||||
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
std::u16string u16str;
|
||||
std::u32string u32str;
|
||||
assert(u16str.max_size() == std::numeric_limits<size_t>::max() / 2 - alignment);
|
||||
assert(u32str.max_size() == std::numeric_limits<size_t>::max() / 4 - alignment);
|
||||
#endif
|
||||
}
|
||||
|
||||
void half_size() {
|
||||
|
@ -56,12 +54,10 @@ void half_size() {
|
|||
assert(wstr.max_size() == std::numeric_limits<size_t>::max() / std::max<size_t>(2ul, sizeof(wchar_t)) - alignment);
|
||||
#endif
|
||||
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
std::u16string u16str;
|
||||
std::u32string u32str;
|
||||
assert(u16str.max_size() == std::numeric_limits<size_t>::max() / 2 - alignment);
|
||||
assert(u32str.max_size() == std::numeric_limits<size_t>::max() / 4 - alignment);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool test() {
|
||||
|
|
|
@ -340,10 +340,8 @@ constexpr bool test() {
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -96,10 +96,8 @@ constexpr bool test() {
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -253,10 +253,8 @@ constexpr bool test() {
|
|||
#ifndef _LIBCPP_HAS_NO_CHAR8_T
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,10 +177,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<std::atomic_char8_t, char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<std::atomic_char16_t, char16_t>();
|
||||
test<std::atomic_char32_t, char32_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
test<std::atomic_wchar_t, wchar_t>();
|
||||
#endif
|
||||
|
@ -205,10 +203,8 @@ int main(int, char**)
|
|||
test<volatile std::atomic_ulong, unsigned long>();
|
||||
test<volatile std::atomic_llong, long long>();
|
||||
test<volatile std::atomic_ullong, unsigned long long>();
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<volatile std::atomic_char16_t, char16_t>();
|
||||
test<volatile std::atomic_char32_t, char32_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
test<volatile std::atomic_wchar_t, wchar_t>();
|
||||
#endif
|
||||
|
|
|
@ -60,10 +60,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
static_assert((std::is_same<std::atomic<char8_t>, std::atomic_char8_t>::value), "");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
static_assert((std::is_same<std::atomic<char16_t>, std::atomic_char16_t>::value), "");
|
||||
static_assert((std::is_same<std::atomic<char32_t>, std::atomic_char32_t>::value), "");
|
||||
#endif
|
||||
|
||||
// Added by LWG 2441
|
||||
static_assert((std::is_same<std::atomic<intptr_t>, std::atomic_intptr_t>::value), "");
|
||||
|
|
|
@ -29,10 +29,8 @@ static_assert(std::three_way_comparable<wchar_t&>);
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
static_assert(std::three_way_comparable<char8_t const&>);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
static_assert(std::three_way_comparable<char16_t volatile&>);
|
||||
static_assert(std::three_way_comparable<char32_t const volatile&>);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_INT128
|
||||
static_assert(std::three_way_comparable<__int128_t const&>);
|
||||
static_assert(std::three_way_comparable<__uint128_t const&>);
|
||||
|
|
|
@ -49,10 +49,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
test<signed char>();
|
||||
test<unsigned char>();
|
||||
test<signed short>();
|
||||
|
|
|
@ -36,10 +36,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
#endif
|
||||
test<short>(0);
|
||||
test<unsigned short>(0);
|
||||
test<int>(0);
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 8>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 16>();
|
||||
test<char32_t, 32>();
|
||||
#endif
|
||||
test<short, 15>();
|
||||
test<unsigned short, 16>();
|
||||
test<int, 31>();
|
||||
|
|
|
@ -39,10 +39,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 2>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 4>();
|
||||
test<char32_t, 9>();
|
||||
#endif
|
||||
test<short, 4>();
|
||||
test<unsigned short, 4>();
|
||||
test<int, 9>();
|
||||
|
|
|
@ -36,10 +36,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
#endif
|
||||
test<short>(0);
|
||||
test<unsigned short>(0);
|
||||
test<int>(0);
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, std::denorm_absent>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, std::denorm_absent>();
|
||||
test<char32_t, std::denorm_absent>();
|
||||
#endif
|
||||
test<short, std::denorm_absent>();
|
||||
test<unsigned short, std::denorm_absent>();
|
||||
test<int, std::denorm_absent>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, false>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, false>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, false>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, false>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -38,10 +38,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
#endif
|
||||
test<short>(0);
|
||||
test<unsigned short>(0);
|
||||
test<int>(0);
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
#endif
|
||||
test<short, true>();
|
||||
test<unsigned short, true>();
|
||||
test<int, true>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
#endif
|
||||
test<short, true>();
|
||||
test<unsigned short, true>();
|
||||
test<int, true>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, false>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
#endif
|
||||
test<short, true>();
|
||||
test<unsigned short, true>();
|
||||
test<int, true>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, true>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, true>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, true>();
|
||||
test<unsigned short, false>();
|
||||
test<int, true>();
|
||||
|
|
|
@ -47,10 +47,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
#endif
|
||||
test<short>(SHRT_MIN);
|
||||
test<unsigned short>(0);
|
||||
test<int>(INT_MIN);
|
||||
|
|
|
@ -47,10 +47,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(UCHAR_MAX); // ??
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(USHRT_MAX);
|
||||
test<char32_t>(UINT_MAX);
|
||||
#endif
|
||||
test<short>(SHRT_MAX);
|
||||
test<unsigned short>(USHRT_MAX);
|
||||
test<int>(INT_MAX);
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
#endif
|
||||
test<short, 0>();
|
||||
test<unsigned short, 0>();
|
||||
test<int, 0>();
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
#endif
|
||||
test<short, 0>();
|
||||
test<unsigned short, 0>();
|
||||
test<int, 0>();
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
#endif
|
||||
test<short, 0>();
|
||||
test<unsigned short, 0>();
|
||||
test<int, 0>();
|
||||
|
|
|
@ -47,10 +47,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
#endif
|
||||
test<short>(SHRT_MIN);
|
||||
test<unsigned short>(0);
|
||||
test<int>(INT_MIN);
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
#endif
|
||||
test<short, 0>();
|
||||
test<unsigned short, 0>();
|
||||
test<int, 0>();
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 0>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 0>();
|
||||
test<char32_t, 0>();
|
||||
#endif
|
||||
test<short, 0>();
|
||||
test<unsigned short, 0>();
|
||||
test<int, 0>();
|
||||
|
|
|
@ -55,10 +55,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
test<short>();
|
||||
test<unsigned short>();
|
||||
test<int>();
|
||||
|
|
|
@ -35,10 +35,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, 2>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, 2>();
|
||||
test<char32_t, 2>();
|
||||
#endif
|
||||
test<short, 2>();
|
||||
test<unsigned short, 2>();
|
||||
test<int, 2>();
|
||||
|
|
|
@ -36,10 +36,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>(0);
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>(0);
|
||||
test<char32_t>(0);
|
||||
#endif
|
||||
test<short>(0);
|
||||
test<unsigned short>(0);
|
||||
test<int>(0);
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, std::round_toward_zero>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, std::round_toward_zero>();
|
||||
test<char32_t, std::round_toward_zero>();
|
||||
#endif
|
||||
test<short, std::round_toward_zero>();
|
||||
test<unsigned short, std::round_toward_zero>();
|
||||
test<int, std::round_toward_zero>();
|
||||
|
|
|
@ -55,10 +55,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
test<short>();
|
||||
test<unsigned short>();
|
||||
test<int>();
|
||||
|
|
|
@ -34,10 +34,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, false>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, false>();
|
||||
test<char32_t, false>();
|
||||
#endif
|
||||
test<short, false>();
|
||||
test<unsigned short, false>();
|
||||
test<int, false>();
|
||||
|
|
|
@ -41,10 +41,8 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
test<char8_t, integral_types_trap>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, integral_types_trap>();
|
||||
test<char32_t, integral_types_trap>();
|
||||
#endif
|
||||
test<short, integral_types_trap>();
|
||||
test<unsigned short, integral_types_trap>();
|
||||
test<int, integral_types_trap>();
|
||||
|
|
|
@ -29,10 +29,8 @@ int main(int, char**) {
|
|||
#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
|
||||
test_hash_enabled_for_type<std::u8string>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test_hash_enabled_for_type<std::u16string>();
|
||||
test_hash_enabled_for_type<std::u32string>();
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -46,10 +46,8 @@ int main(int, char**)
|
|||
#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
|
||||
test<std::u8string>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<std::u16string>();
|
||||
test<std::u32string>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
test<std::wstring>();
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
char16_t c = u'\0';
|
||||
std::char_traits<char16_t>::assign(c, u'a');
|
||||
|
@ -39,7 +38,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,14 +19,12 @@
|
|||
|
||||
TEST_CONSTEXPR_CXX20 bool test()
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char16_t s2[3] = {0};
|
||||
assert(std::char_traits<char16_t>::assign(s2, 3, char16_t(5)) == s2);
|
||||
assert(s2[0] == char16_t(5));
|
||||
assert(s2[1] == char16_t(5));
|
||||
assert(s2[2] == char16_t(5));
|
||||
assert(std::char_traits<char16_t>::assign(NULL, 0, char16_t(5)) == NULL);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char16_t>::compare(u"", u"", 0) == 0);
|
||||
assert(std::char_traits<char16_t>::compare(NULL, NULL, 0) == 0);
|
||||
|
@ -57,7 +56,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
TEST_CONSTEXPR_CXX20 bool test()
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char16_t s1[] = {1, 2, 3};
|
||||
char16_t s2[3] = {0};
|
||||
assert(std::char_traits<char16_t>::copy(s2, s1, 3) == s2);
|
||||
|
@ -28,9 +27,8 @@ TEST_CONSTEXPR_CXX20 bool test()
|
|||
assert(s2[2] == char16_t(3));
|
||||
assert(std::char_traits<char16_t>::copy(NULL, s1, 0) == NULL);
|
||||
assert(std::char_traits<char16_t>::copy(s1, NULL, 0) == s1);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
@ -41,5 +39,5 @@ int main(int, char**)
|
|||
static_assert(test());
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -13,16 +13,10 @@
|
|||
// static constexpr int_type eof();
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
std::char_traits<char16_t>::int_type i = std::char_traits<char16_t>::eof();
|
||||
((void)i); // Prevent unused warning
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -12,19 +12,14 @@
|
|||
|
||||
// static constexpr bool eq(char_type c1, char_type c2);
|
||||
|
||||
// UNSUPPORTED: c++03
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char16_t>::eq(u'a', u'a'));
|
||||
assert(!std::char_traits<char16_t>::eq(u'a', u'A'));
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert( std::char_traits<char16_t>::eq_int_type(u'a', u'a'));
|
||||
assert(!std::char_traits<char16_t>::eq_int_type(u'a', u'A'));
|
||||
|
@ -27,7 +26,6 @@ int main(int, char**)
|
|||
#endif
|
||||
assert( std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(),
|
||||
std::char_traits<char16_t>::eof()));
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char16_t s1[] = {1, 2, 3};
|
||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(1)) == s1);
|
||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(2)) == s1+1);
|
||||
|
@ -43,7 +42,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char16_t>::length(u"") == 0);
|
||||
assert(std::char_traits<char16_t>::length(u"a") == 1);
|
||||
|
@ -40,7 +39,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -12,19 +12,14 @@
|
|||
|
||||
// static constexpr bool lt(char_type c1, char_type c2);
|
||||
|
||||
// UNSUPPORTED: c++03
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(!std::char_traits<char16_t>::lt(u'a', u'a'));
|
||||
assert( std::char_traits<char16_t>::lt(u'A', u'a'));
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
TEST_CONSTEXPR_CXX20 bool test()
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char16_t s1[] = {1, 2, 3};
|
||||
assert(std::char_traits<char16_t>::move(s1, s1+1, 2) == s1);
|
||||
assert(s1[0] == char16_t(2));
|
||||
|
@ -32,9 +31,8 @@ TEST_CONSTEXPR_CXX20 bool test()
|
|||
assert(s1[2] == char16_t(3));
|
||||
assert(std::char_traits<char16_t>::move(NULL, s1, 0) == NULL);
|
||||
assert(std::char_traits<char16_t>::move(s1, NULL, 0) == s1);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char16_t>::not_eof(u'a') == u'a');
|
||||
assert(std::char_traits<char16_t>::not_eof(u'A') == u'A');
|
||||
|
@ -27,7 +26,6 @@ int main(int, char**)
|
|||
assert(std::char_traits<char16_t>::not_eof(0) == 0);
|
||||
assert(std::char_traits<char16_t>::not_eof(std::char_traits<char16_t>::eof()) !=
|
||||
std::char_traits<char16_t>::eof());
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,13 +19,11 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char16_t>::to_char_type(u'a') == u'a');
|
||||
assert(std::char_traits<char16_t>::to_char_type(u'A') == u'A');
|
||||
#endif
|
||||
assert(std::char_traits<char16_t>::to_char_type(0) == 0);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,13 +19,11 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char16_t>::to_int_type(u'a') == u'a');
|
||||
assert(std::char_traits<char16_t>::to_int_type(u'A') == u'A');
|
||||
#endif
|
||||
assert(std::char_traits<char16_t>::to_int_type(0) == 0);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -24,13 +24,11 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::char_type, char16_t>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::int_type, std::uint_least16_t>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::off_type, std::streamoff>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::pos_type, std::u16streampos>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::state_type, std::mbstate_t>::value), "");
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
char32_t c = U'\0';
|
||||
std::char_traits<char32_t>::assign(c, U'a');
|
||||
|
@ -39,7 +38,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,16 +19,14 @@
|
|||
|
||||
TEST_CONSTEXPR_CXX20 bool test()
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char32_t s2[3] = {0};
|
||||
assert(std::char_traits<char32_t>::assign(s2, 3, char32_t(5)) == s2);
|
||||
assert(s2[0] == char32_t(5));
|
||||
assert(s2[1] == char32_t(5));
|
||||
assert(s2[2] == char32_t(5));
|
||||
assert(std::char_traits<char32_t>::assign(NULL, 0, char32_t(5)) == NULL);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
|
|
@ -29,7 +29,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char32_t>::compare(U"", U"", 0) == 0);
|
||||
assert(std::char_traits<char32_t>::compare(NULL, NULL, 0) == 0);
|
||||
|
@ -56,7 +55,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
TEST_CONSTEXPR_CXX20 bool test()
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char32_t s1[] = {1, 2, 3};
|
||||
char32_t s2[3] = {0};
|
||||
assert(std::char_traits<char32_t>::copy(s2, s1, 3) == s2);
|
||||
|
@ -28,9 +27,8 @@ TEST_CONSTEXPR_CXX20 bool test()
|
|||
assert(s2[2] == char32_t(3));
|
||||
assert(std::char_traits<char32_t>::copy(NULL, s1, 0) == NULL);
|
||||
assert(std::char_traits<char32_t>::copy(s1, NULL, 0) == s1);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
|
|
@ -19,10 +19,8 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
std::char_traits<char32_t>::int_type i = std::char_traits<char32_t>::eof();
|
||||
((void)i); // Prevent unused warning
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -12,19 +12,14 @@
|
|||
|
||||
// static constexpr bool eq(char_type c1, char_type c2);
|
||||
|
||||
// UNSUPPORTED: c++03
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char32_t>::eq(U'a', U'a'));
|
||||
assert(!std::char_traits<char32_t>::eq(U'a', U'A'));
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert( std::char_traits<char32_t>::eq_int_type(U'a', U'a'));
|
||||
assert(!std::char_traits<char32_t>::eq_int_type(U'a', U'A'));
|
||||
|
@ -27,7 +26,6 @@ int main(int, char**)
|
|||
#endif
|
||||
assert( std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(),
|
||||
std::char_traits<char32_t>::eof()));
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char32_t s1[] = {1, 2, 3};
|
||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(1)) == s1);
|
||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(2)) == s1+1);
|
||||
|
@ -43,7 +42,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ constexpr bool test_constexpr()
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char32_t>::length(U"") == 0);
|
||||
assert(std::char_traits<char32_t>::length(U"a") == 1);
|
||||
|
@ -40,7 +39,6 @@ int main(int, char**)
|
|||
#if TEST_STD_VER > 14
|
||||
static_assert(test_constexpr(), "" );
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -12,19 +12,14 @@
|
|||
|
||||
// static constexpr bool lt(char_type c1, char_type c2);
|
||||
|
||||
// UNSUPPORTED: c++03
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(!std::char_traits<char32_t>::lt(U'a', U'a'));
|
||||
assert( std::char_traits<char32_t>::lt(U'A', U'a'));
|
||||
#endif
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
TEST_CONSTEXPR_CXX20 bool test()
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char32_t s1[] = {1, 2, 3};
|
||||
assert(std::char_traits<char32_t>::move(s1, s1+1, 2) == s1);
|
||||
assert(s1[0] == char32_t(2));
|
||||
|
@ -32,9 +31,8 @@ TEST_CONSTEXPR_CXX20 bool test()
|
|||
assert(s1[2] == char32_t(3));
|
||||
assert(std::char_traits<char32_t>::move(NULL, s1, 0) == NULL);
|
||||
assert(std::char_traits<char32_t>::move(s1, NULL, 0) == s1);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char32_t>::not_eof(U'a') == U'a');
|
||||
assert(std::char_traits<char32_t>::not_eof(U'A') == U'A');
|
||||
|
@ -27,7 +26,6 @@ int main(int, char**)
|
|||
assert(std::char_traits<char32_t>::not_eof(0) == 0);
|
||||
assert(std::char_traits<char32_t>::not_eof(std::char_traits<char32_t>::eof()) !=
|
||||
std::char_traits<char32_t>::eof());
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,13 +19,11 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char32_t>::to_char_type(U'a') == U'a');
|
||||
assert(std::char_traits<char32_t>::to_char_type(U'A') == U'A');
|
||||
#endif
|
||||
assert(std::char_traits<char32_t>::to_char_type(0) == 0);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,13 +19,11 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
#if TEST_STD_VER >= 11
|
||||
assert(std::char_traits<char32_t>::to_int_type(U'a') == U'a');
|
||||
assert(std::char_traits<char32_t>::to_int_type(U'A') == U'A');
|
||||
#endif
|
||||
assert(std::char_traits<char32_t>::to_int_type(0) == 0);
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -20,17 +20,8 @@
|
|||
#include <type_traits>
|
||||
#include <cstdint>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::char_type, char32_t>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::int_type, std::uint_least32_t>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::off_type, std::streamoff>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::pos_type, std::u32streampos>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::state_type, std::mbstate_t>::value), "");
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::char_type, char32_t>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::int_type, std::uint_least32_t>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::off_type, std::streamoff>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::pos_type, std::u32streampos>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char32_t>::state_type, std::mbstate_t>::value), "");
|
|
@ -22,19 +22,12 @@
|
|||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
static_assert((std::is_same<std::string, std::basic_string<char> >::value), "");
|
||||
static_assert((std::is_same<std::string, std::basic_string<char> >::value), "");
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
static_assert((std::is_same<std::wstring, std::basic_string<wchar_t> >::value), "");
|
||||
static_assert((std::is_same<std::wstring, std::basic_string<wchar_t> >::value), "");
|
||||
#endif
|
||||
#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
|
||||
static_assert((std::is_same<std::u8string, std::basic_string<char8_t> >::value), "");
|
||||
static_assert((std::is_same<std::u8string, std::basic_string<char8_t> >::value), "");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
static_assert((std::is_same<std::u16string, std::basic_string<char16_t> >::value), "");
|
||||
static_assert((std::is_same<std::u32string, std::basic_string<char32_t> >::value), "");
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
return 0;
|
||||
}
|
||||
static_assert((std::is_same<std::u16string, std::basic_string<char16_t> >::value), "");
|
||||
static_assert((std::is_same<std::u32string, std::basic_string<char32_t> >::value), "");
|
|
@ -37,10 +37,8 @@ int main(int, char**) {
|
|||
assert( test<std::u8string_view> (u8"1234"));
|
||||
#endif
|
||||
#if TEST_STD_VER >= 11
|
||||
# ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
assert( test<std::u16string_view> ( u"1234"));
|
||||
assert( test<std::u32string_view> ( U"1234"));
|
||||
# endif
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
assert( test<std::wstring_view> ( L"1234"));
|
||||
|
@ -51,10 +49,8 @@ int main(int, char**) {
|
|||
# if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
|
||||
static_assert( test<std::u8string_view> ({u8"abc", 3}), "");
|
||||
# endif
|
||||
# ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
static_assert( test<std::u16string_view> ({ u"abc", 3}), "");
|
||||
static_assert( test<std::u32string_view> ({ U"abc", 3}), "");
|
||||
# endif
|
||||
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
static_assert( test<std::wstring_view> ({ L"abc", 3}), "");
|
||||
# endif
|
||||
|
|
|
@ -30,10 +30,8 @@ int main(int, char**) {
|
|||
#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
|
||||
test_hash_enabled_for_type<std::u8string_view>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test_hash_enabled_for_type<std::u16string_view>();
|
||||
test_hash_enabled_for_type<std::u32string_view>();
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -63,10 +63,8 @@ int main(int, char**)
|
|||
#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
|
||||
test<std::u8string_view>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<std::u16string_view>();
|
||||
test<std::u32string_view>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
test<std::wstring_view>();
|
||||
#endif
|
||||
|
|
|
@ -36,10 +36,8 @@ void test() {
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int, char**) {
|
||||
|
|
|
@ -56,7 +56,6 @@ void test() {
|
|||
std::make_format_args<std::basic_format_context<
|
||||
std::back_insert_iterator<std::basic_string<char8_t>>, char8_t>>()));
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test(std::basic_format_args(
|
||||
std::make_format_args<std::basic_format_context<
|
||||
std::back_insert_iterator<std::basic_string<char16_t>>,
|
||||
|
@ -65,7 +64,6 @@ void test() {
|
|||
std::make_format_args<std::basic_format_context<
|
||||
std::back_insert_iterator<std::basic_string<char32_t>>,
|
||||
char32_t>>()));
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int, char**) {
|
||||
|
|
|
@ -52,7 +52,6 @@ void test() {
|
|||
std::make_format_args<std::basic_format_context<
|
||||
std::back_insert_iterator<std::basic_string<char8_t>>, char8_t>>()));
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test(std::basic_format_args(
|
||||
std::make_format_args<std::basic_format_context<
|
||||
std::back_insert_iterator<std::basic_string<char16_t>>,
|
||||
|
@ -61,7 +60,6 @@ void test() {
|
|||
std::make_format_args<std::basic_format_context<
|
||||
std::back_insert_iterator<std::basic_string<char32_t>>,
|
||||
char32_t>>()));
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int, char**) {
|
||||
|
|
|
@ -54,10 +54,8 @@ constexpr bool test() {
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
test(u8"abc");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test(u"abc");
|
||||
test(U"abc");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,8 @@ constexpr bool test() {
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
test(u8"abc");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test(u"abc");
|
||||
test(U"abc");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -63,10 +63,8 @@ constexpr bool test() {
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
test(u8"abc");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test(u"abc");
|
||||
test(U"abc");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,8 @@ constexpr bool test() {
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
test(u8"abc");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test(u"abc");
|
||||
test(U"abc");
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -52,10 +52,8 @@ constexpr void test() {
|
|||
#ifndef TEST_HAS_NO_CHAR8_T
|
||||
test<char8_t>();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t>();
|
||||
test<char32_t>();
|
||||
#endif
|
||||
}
|
||||
|
||||
static_assert(std::is_same_v<std::format_parse_context,
|
||||
|
|
|
@ -97,7 +97,6 @@ constexpr void test_char8t() {
|
|||
}
|
||||
#endif // TEST_HAS_NO_CHAR8_T
|
||||
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
template <class T>
|
||||
constexpr void test_uchars() {
|
||||
std::cmp_equal(T(), T()); // expected-error 2 {{no matching function for call to 'cmp_equal'}}
|
||||
|
@ -121,7 +120,6 @@ constexpr void test_uchars() {
|
|||
std::in_range<T>(int()); // expected-error 2 {{no matching function for call to 'in_range'}}
|
||||
std::in_range<int>(T()); // expected-error 2 {{no matching function for call to 'in_range'}}
|
||||
}
|
||||
#endif // TEST_HAS_NO_UNICODE_CHARS
|
||||
|
||||
int main(int, char**) {
|
||||
test<bool>();
|
||||
|
@ -142,10 +140,8 @@ int main(int, char**) {
|
|||
test_char8t<char8_t>();
|
||||
#endif // TEST_HAS_NO_CHAR8_T
|
||||
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
test_uchars<char16_t>();
|
||||
test_uchars<char32_t>();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -81,10 +81,8 @@ struct TestEachIntegralType {
|
|||
#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
|
||||
TestFunctor<char8_t>()();
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
TestFunctor<char16_t>()();
|
||||
TestFunctor<char32_t>()();
|
||||
#endif
|
||||
TestFunctor<int8_t>()();
|
||||
TestFunctor<uint8_t>()();
|
||||
TestFunctor<int16_t>()();
|
||||
|
|
|
@ -60,10 +60,8 @@ using LibraryHashTypes = TypeList<
|
|||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
wchar_t,
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
char16_t,
|
||||
char32_t,
|
||||
#endif
|
||||
short,
|
||||
unsigned short,
|
||||
int,
|
||||
|
|
|
@ -37,7 +37,6 @@ int main(int, char**) {
|
|||
== u8" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
|
||||
"OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
|
||||
#endif
|
||||
#ifndef TEST_HAS_NO_UNICODE_CHARS
|
||||
assert(MAKE_STRING(char16_t,
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
|
||||
"OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
|
||||
|
@ -49,7 +48,6 @@ int main(int, char**) {
|
|||
"OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
|
||||
== U" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
|
||||
"OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
|
||||
#endif
|
||||
|
||||
// clang-format on
|
||||
return 0;
|
||||
|
|
|
@ -363,10 +363,6 @@ inline void DoNotOptimize(Tp const& value) {
|
|||
# define TEST_HAS_NO_INT128
|
||||
#endif
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_UNICODE_CHARS)
|
||||
# define TEST_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
|
||||
# define TEST_HAS_NO_LOCALIZATION
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue