summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-19 13:55:54 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-09-04 10:41:01 (GMT)
commitf6d448c52caf8f2ad411bd41e5c7e787cf57ef20 (patch)
tree588bb10af179ae9ff930219b0afdeeacf39ef734
parentc752c63b62b5b2b419fa995ec0b5e5dc855eafbc (diff)
downloadQt-f6d448c52caf8f2ad411bd41e5c7e787cf57ef20.zip
Qt-f6d448c52caf8f2ad411bd41e5c7e787cf57ef20.tar.gz
Qt-f6d448c52caf8f2ad411bd41e5c7e787cf57ef20.tar.bz2
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.
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TypeTraits.h40
1 files 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<long double> { static const bool value = true; };
template <typename P> struct IsPod<P*> { static const bool value = true; };
- template<typename T> class IsConvertibleToInteger {
- // Avoid "possible loss of data" warning when using Microsoft's C++ compiler
- // by not converting int's to doubles.
- template<bool performCheck, typename U> class IsConvertibleToDouble;
- template<typename U> class IsConvertibleToDouble<false, U> {
- 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<bool performCheck, typename U> class CheckedIsConvertibleToDouble;
+ template<typename U> class CheckedIsConvertibleToDouble<false, U> {
+ public:
+ static const bool value = false;
+ };
- template<typename U> class IsConvertibleToDouble<true, U> {
- 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<typename U> class CheckedIsConvertibleToDouble<true, U> {
+ 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<typename T> class IsConvertibleToInteger {
public:
- static const bool value = IsInteger<T>::value || IsConvertibleToDouble<!IsInteger<T>::value, T>::value;
+ static const bool value = IsInteger<T>::value || CheckedIsConvertibleToDouble<!IsInteger<T>::value, T>::value;
};
template <typename T, typename U> struct IsSameType {