summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/wtf/HashTraits.h
diff options
context:
space:
mode:
authorFeng Qian <>2009-04-10 18:11:29 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-10 18:11:29 -0700
commit8f72e70a9fd78eec56623b3a62e68f16b7b27e28 (patch)
tree181bf9a400c30a1bf34ea6d72560e8d00111d549 /JavaScriptCore/wtf/HashTraits.h
parent7ed56f225e0ade046e1c2178977f72b2d896f196 (diff)
downloadexternal_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.zip
external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.gz
external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.bz2
AI 145796: Land the WebKit merge @r42026.
Automated import of CL 145796
Diffstat (limited to 'JavaScriptCore/wtf/HashTraits.h')
-rw-r--r--JavaScriptCore/wtf/HashTraits.h43
1 files changed, 1 insertions, 42 deletions
diff --git a/JavaScriptCore/wtf/HashTraits.h b/JavaScriptCore/wtf/HashTraits.h
index b3c0b7a..c8d40f7 100644
--- a/JavaScriptCore/wtf/HashTraits.h
+++ b/JavaScriptCore/wtf/HashTraits.h
@@ -21,8 +21,8 @@
#ifndef WTF_HashTraits_h
#define WTF_HashTraits_h
-#include "Assertions.h"
#include "HashFunctions.h"
+#include "TypeTraits.h"
#include <utility>
#include <limits>
@@ -31,47 +31,6 @@ namespace WTF {
using std::pair;
using std::make_pair;
- template<typename T> struct IsInteger { static const bool value = false; };
- template<> struct IsInteger<bool> { static const bool value = true; };
- template<> struct IsInteger<char> { static const bool value = true; };
- template<> struct IsInteger<signed char> { static const bool value = true; };
- template<> struct IsInteger<unsigned char> { static const bool value = true; };
- template<> struct IsInteger<short> { static const bool value = true; };
- template<> struct IsInteger<unsigned short> { static const bool value = true; };
- template<> struct IsInteger<int> { static const bool value = true; };
- template<> struct IsInteger<unsigned int> { static const bool value = true; };
- template<> struct IsInteger<long> { static const bool value = true; };
- template<> struct IsInteger<unsigned long> { static const bool value = true; };
- template<> struct IsInteger<long long> { static const bool value = true; };
- template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-
-#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
- template<> struct IsInteger<wchar_t> { static const bool value = true; };
-#endif
-
- COMPILE_ASSERT(IsInteger<bool>::value, WTF_IsInteger_bool_true);
- COMPILE_ASSERT(IsInteger<char>::value, WTF_IsInteger_char_true);
- COMPILE_ASSERT(IsInteger<signed char>::value, WTF_IsInteger_signed_char_true);
- COMPILE_ASSERT(IsInteger<unsigned char>::value, WTF_IsInteger_unsigned_char_true);
- COMPILE_ASSERT(IsInteger<short>::value, WTF_IsInteger_short_true);
- COMPILE_ASSERT(IsInteger<unsigned short>::value, WTF_IsInteger_unsigned_short_true);
- COMPILE_ASSERT(IsInteger<int>::value, WTF_IsInteger_int_true);
- COMPILE_ASSERT(IsInteger<unsigned int>::value, WTF_IsInteger_unsigned_int_true);
- COMPILE_ASSERT(IsInteger<long>::value, WTF_IsInteger_long_true);
- COMPILE_ASSERT(IsInteger<unsigned long>::value, WTF_IsInteger_unsigned_long_true);
- COMPILE_ASSERT(IsInteger<long long>::value, WTF_IsInteger_long_long_true);
- COMPILE_ASSERT(IsInteger<unsigned long long>::value, WTF_IsInteger_unsigned_long_long_true);
-
-#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
- COMPILE_ASSERT(IsInteger<wchar_t>::value, WTF_IsInteger_wchar_t_true);
-#endif
-
- COMPILE_ASSERT(!IsInteger<char*>::value, WTF_IsInteger_char_pointer_false);
- COMPILE_ASSERT(!IsInteger<const char* >::value, WTF_IsInteger_const_char_pointer_false);
- COMPILE_ASSERT(!IsInteger<volatile char* >::value, WTF_IsInteger_volatile_char_pointer__false);
- COMPILE_ASSERT(!IsInteger<double>::value, WTF_IsInteger_double_false);
- COMPILE_ASSERT(!IsInteger<float>::value, WTF_IsInteger_float_false);
-
template<typename T> struct HashTraits;
template<bool isInteger, typename T> struct GenericHashTraitsBase;