ignore some template specializations for systems with no big char builtins

master
Daniel Kolesa 2016-07-06 19:10:17 +02:00
parent 0c8c16a44a
commit 0a1b578fcd
3 changed files with 5 additions and 0 deletions

View File

@ -240,8 +240,10 @@ OSTD_HASH_BASIC(ushort)
OSTD_HASH_BASIC(uint)
OSTD_HASH_BASIC(ulong)
#ifndef OSTD_TYPES_CHAR_16_32_NO_BUILTINS
OSTD_HASH_BASIC(Char16)
OSTD_HASH_BASIC(Char32)
#endif
OSTD_HASH_BASIC(Wchar)
#undef OSTD_HASH_BASIC

View File

@ -101,8 +101,10 @@ namespace detail {
template<> constexpr bool IsIntegralBase<llong > = true;
template<> constexpr bool IsIntegralBase<ullong> = true;
#ifndef OSTD_TYPES_CHAR_16_32_NO_BUILTINS
template<> constexpr bool IsIntegralBase<Char16> = true;
template<> constexpr bool IsIntegralBase<Char32> = true;
#endif
template<> constexpr bool IsIntegralBase<Wchar > = true;
}

View File

@ -37,6 +37,7 @@ using Wchar = wchar_t;
#if defined(_MSC_VER) && (_MSC_VER < 1900)
using Char16 = uint16_t;
using Char32 = uint32_t;
#define OSTD_TYPES_CHAR_16_32_NO_BUILTINS 1
#else
using Char16 = char16_t;
using Char32 = char32_t;