From f6d448c52caf8f2ad411bd41e5c7e787cf57ef20 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 19 Jul 2009 15:55:54 +0200 Subject: Fix compilation with xlC 7: apparently problem with nested templates. 1540-0062 (S) The incomplete class "IsConvertibleToDouble<0, char>" must not be used as a qualifier. --- .../webkit/JavaScriptCore/wtf/TypeTraits.h | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h b/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h index 6ce6a3e..56659a8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h @@ -70,30 +70,30 @@ namespace WTF { template <> struct IsPod { static const bool value = true; }; template struct IsPod { static const bool value = true; }; - template class IsConvertibleToInteger { - // Avoid "possible loss of data" warning when using Microsoft's C++ compiler - // by not converting int's to doubles. - template class IsConvertibleToDouble; - template class IsConvertibleToDouble { - public: - static const bool value = false; - }; + // Avoid "possible loss of data" warning when using Microsoft's C++ compiler + // by not converting int's to doubles. + template class CheckedIsConvertibleToDouble; + template class CheckedIsConvertibleToDouble { + public: + static const bool value = false; + }; - template class IsConvertibleToDouble { - typedef char YesType; - struct NoType { - char padding[8]; - }; - - static YesType floatCheck(long double); - static NoType floatCheck(...); - static T& t; - public: - static const bool value = sizeof(floatCheck(t)) == sizeof(YesType); + template class CheckedIsConvertibleToDouble { + typedef char YesType; + struct NoType { + char padding[8]; }; + static YesType floatCheck(long double); + static NoType floatCheck(...); + static U& t; + public: + static const bool value = sizeof(floatCheck(t)) == sizeof(YesType); + }; + + template class IsConvertibleToInteger { public: - static const bool value = IsInteger::value || IsConvertibleToDouble::value, T>::value; + static const bool value = IsInteger::value || CheckedIsConvertibleToDouble::value, T>::value; }; template struct IsSameType { -- cgit v0.12