]> git.pld-linux.org Git - packages/qt5-qtwebkit.git/blob - new-char-types.patch
- fix type_must_have_known_encoded_size assertions
[packages/qt5-qtwebkit.git] / new-char-types.patch
1 diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h
2 index ead844f..e62cfd4 100644
3 --- a/Source/WTF/wtf/Compiler.h
4 +++ b/Source/WTF/wtf/Compiler.h
5 @@ -61,6 +61,7 @@
6  #define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_feature(has_trivial_destructor)
7  #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
8  #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
9 +#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES !defined(_LIBCPP_HAS_NO_UNICODE_CHARS)
10  
11  #endif
12  
13 @@ -142,6 +143,7 @@
14  #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
15  #endif
16  #if GCC_VERSION_AT_LEAST(4, 5, 0)
17 +#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES 1
18  #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
19  #endif
20  #if GCC_VERSION_AT_LEAST(4, 6, 0)
21 diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
22 index b9e46bc..876fa45 100644
23 --- a/Source/WTF/wtf/TypeTraits.h
24 +++ b/Source/WTF/wtf/TypeTraits.h
25 @@ -75,6 +75,10 @@ namespace WTF {
26  #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
27      template<> struct IsInteger<wchar_t>            { static const bool value = true; };
28  #endif
29 +#if COMPILER_SUPPORTS(CXX_NEW_CHAR_TYPES)
30 +    template<> struct IsInteger<char16_t>           { static const bool value = true; };
31 +    template<> struct IsInteger<char32_t>           { static const bool value = true; };
32 +#endif
33  
34      template<typename T> struct IsFloatingPoint     { static const bool value = false; };
35      template<> struct IsFloatingPoint<float>        { static const bool value = true; };
This page took 0.086671 seconds and 3 git commands to generate.