From 0a1b578fcd85796a705db2d39612562bd83c9852 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 6 Jul 2016 19:10:17 +0200 Subject: [PATCH] ignore some template specializations for systems with no big char builtins --- ostd/functional.hh | 2 ++ ostd/type_traits.hh | 2 ++ ostd/types.hh | 1 + 3 files changed, 5 insertions(+) diff --git a/ostd/functional.hh b/ostd/functional.hh index 0914e1f..3940fb0 100644 --- a/ostd/functional.hh +++ b/ostd/functional.hh @@ -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 diff --git a/ostd/type_traits.hh b/ostd/type_traits.hh index 467fa8c..909e9db 100644 --- a/ostd/type_traits.hh +++ b/ostd/type_traits.hh @@ -101,8 +101,10 @@ namespace detail { template<> constexpr bool IsIntegralBase = true; template<> constexpr bool IsIntegralBase = true; +#ifndef OSTD_TYPES_CHAR_16_32_NO_BUILTINS template<> constexpr bool IsIntegralBase = true; template<> constexpr bool IsIntegralBase = true; +#endif template<> constexpr bool IsIntegralBase = true; } diff --git a/ostd/types.hh b/ostd/types.hh index 7c197f2..dde0c7d 100644 --- a/ostd/types.hh +++ b/ostd/types.hh @@ -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;