Title: [155357] trunk/Source
Revision
155357
Author
[email protected]
Date
2013-09-09 10:10:19 -0700 (Mon, 09 Sep 2013)

Log Message

Begin moving off of TypeTraits.h
https://bugs.webkit.org/show_bug.cgi?id=121006

Reviewed by Darin Adler.

Source/_javascript_Core:

Convert uses of WTF type traits to STL type traits.

* heap/PassWeak.h:
* runtime/JSCell.h:
(JSC::jsCast):
(JSC::jsDynamicCast):
* runtime/WriteBarrier.h:
(JSC::validateCell):

Source/WebKit2:

Convert uses of WTF type traits to STL type traits.

* Platform/CoreIPC/ArgumentCoder.h:
* Platform/CoreIPC/ArgumentCoders.h:
* Platform/CoreIPC/ArgumentDecoder.h:
* Platform/CoreIPC/ArgumentEncoder.h:
* Platform/CoreIPC/Arguments.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toImpl):

Source/WTF:

The C++11 has its own type traits implementation that is more complete and handles corner cases better
since it ties into the compiler. Begin switching uses of WTF type traits to STL type traits.

* wtf/CheckedArithmetic.h:
* wtf/HashTraits.h:
* wtf/NeverDestroyed.h:
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
(WTF::adoptPtr):
* wtf/RetainPtr.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (155356 => 155357)


--- trunk/Source/_javascript_Core/ChangeLog	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-09-09 17:10:19 UTC (rev 155357)
@@ -1,3 +1,19 @@
+2013-09-08  Anders Carlsson  <[email protected]>
+
+        Begin moving off of TypeTraits.h
+        https://bugs.webkit.org/show_bug.cgi?id=121006
+
+        Reviewed by Darin Adler.
+
+        Convert uses of WTF type traits to STL type traits.
+
+        * heap/PassWeak.h:
+        * runtime/JSCell.h:
+        (JSC::jsCast):
+        (JSC::jsDynamicCast):
+        * runtime/WriteBarrier.h:
+        (JSC::validateCell):
+
 2013-09-08  Mark Hahnenberg  <[email protected]>
 
         Calculating the size of the Heap should not require walking over it

Modified: trunk/Source/_javascript_Core/heap/PassWeak.h (155356 => 155357)


--- trunk/Source/_javascript_Core/heap/PassWeak.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/_javascript_Core/heap/PassWeak.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -30,7 +30,6 @@
 #include "WeakSetInlines.h"
 #include <wtf/Assertions.h>
 #include <wtf/NullPtr.h>
-#include <wtf/TypeTraits.h>
 
 namespace JSC {
 

Modified: trunk/Source/_javascript_Core/runtime/JSCell.h (155356 => 155357)


--- trunk/Source/_javascript_Core/runtime/JSCell.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/_javascript_Core/runtime/JSCell.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -31,7 +31,6 @@
 #include "TypedArrayType.h"
 #include "WriteBarrier.h"
 #include <wtf/Noncopyable.h>
-#include <wtf/TypeTraits.h>
 
 namespace JSC {
 
@@ -178,27 +177,27 @@
 template<typename To, typename From>
 inline To jsCast(From* from)
 {
-    ASSERT(!from || from->JSCell::inherits(WTF::RemovePointer<To>::Type::info()));
+    ASSERT(!from || from->JSCell::inherits(std::remove_pointer<To>::type::info()));
     return static_cast<To>(from);
 }
     
 template<typename To>
 inline To jsCast(JSValue from)
 {
-    ASSERT(from.isCell() && from.asCell()->JSCell::inherits(WTF::RemovePointer<To>::Type::info()));
+    ASSERT(from.isCell() && from.asCell()->JSCell::inherits(std::remove_pointer<To>::type::info()));
     return static_cast<To>(from.asCell());
 }
 
 template<typename To, typename From>
 inline To jsDynamicCast(From* from)
 {
-    return from->inherits(WTF::RemovePointer<To>::Type::info()) ? static_cast<To>(from) : 0;
+    return from->inherits(std::remove_pointer<To>::type::info()) ? static_cast<To>(from) : 0;
 }
 
 template<typename To>
 inline To jsDynamicCast(JSValue from)
 {
-    return from.isCell() && from.asCell()->inherits(WTF::RemovePointer<To>::Type::info()) ? static_cast<To>(from.asCell()) : 0;
+    return from.isCell() && from.asCell()->inherits(std::remove_pointer<To>::type::info()) ? static_cast<To>(from.asCell()) : 0;
 }
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/WriteBarrier.h (155356 => 155357)


--- trunk/Source/_javascript_Core/runtime/WriteBarrier.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/_javascript_Core/runtime/WriteBarrier.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -30,7 +30,6 @@
 #include "HandleTypes.h"
 #include "Heap.h"
 #include "SamplingCounter.h"
-#include <wtf/TypeTraits.h>
 
 namespace JSC {
 
@@ -51,7 +50,7 @@
 #if ENABLE(GC_VALIDATION)
 template<class T> inline void validateCell(T cell)
 {
-    ASSERT_GC_OBJECT_INHERITS(cell, WTF::RemovePointer<T>::Type::info());
+    ASSERT_GC_OBJECT_INHERITS(cell, std::remove_pointer<T>::type::info());
 }
 
 template<> inline void validateCell<JSCell*>(JSCell* cell)

Modified: trunk/Source/WTF/ChangeLog (155356 => 155357)


--- trunk/Source/WTF/ChangeLog	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/ChangeLog	2013-09-09 17:10:19 UTC (rev 155357)
@@ -1,3 +1,21 @@
+2013-09-08  Anders Carlsson  <[email protected]>
+
+        Begin moving off of TypeTraits.h
+        https://bugs.webkit.org/show_bug.cgi?id=121006
+
+        Reviewed by Darin Adler.
+
+        The C++11 has its own type traits implementation that is more complete and handles corner cases better
+        since it ties into the compiler. Begin switching uses of WTF type traits to STL type traits.
+
+        * wtf/CheckedArithmetic.h:
+        * wtf/HashTraits.h:
+        * wtf/NeverDestroyed.h:
+        * wtf/OwnPtr.h:
+        * wtf/PassOwnPtr.h:
+        (WTF::adoptPtr):
+        * wtf/RetainPtr.h:
+
 2013-09-09  Julien Brianceau  <[email protected]>
 
         [Qt] Remove FastAllocBase.h from WTF.pro.

Modified: trunk/Source/WTF/wtf/CheckedArithmetic.h (155356 => 155357)


--- trunk/Source/WTF/wtf/CheckedArithmetic.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/wtf/CheckedArithmetic.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -28,10 +28,10 @@
 
 #include <wtf/Assertions.h>
 #include <wtf/EnumClass.h>
-#include <wtf/TypeTraits.h>
 
 #include <limits>
 #include <stdint.h>
+#include <type_traits>
 
 /* Checked<T>
  *
@@ -161,7 +161,7 @@
     }
 };
 
-template <typename Target, typename Source, bool CanElide = IsSameType<Target, Source>::value || (sizeof(Target) > sizeof(Source)) > struct BoundsCheckElider;
+template <typename Target, typename Source, bool CanElide = std::is_same<Target, Source>::value || (sizeof(Target) > sizeof(Source)) > struct BoundsCheckElider;
 template <typename Target, typename Source> struct BoundsCheckElider<Target, Source, true> {
     static bool inBounds(Source) { return true; }
 };

Modified: trunk/Source/WTF/wtf/HashTraits.h (155356 => 155357)


--- trunk/Source/WTF/wtf/HashTraits.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/wtf/HashTraits.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -23,7 +23,6 @@
 
 #include <wtf/HashFunctions.h>
 #include <wtf/StdLibExtras.h>
-#include <wtf/TypeTraits.h>
 #include <utility>
 #include <limits>
 
@@ -63,7 +62,7 @@
         static bool isDeletedValue(T value) { return value == static_cast<T>(-1); }
     };
 
-    template<typename T> struct GenericHashTraits : GenericHashTraitsBase<IsInteger<T>::value, T> {
+    template<typename T> struct GenericHashTraits : GenericHashTraitsBase<std::is_integral<T>::value, T> {
         typedef T TraitType;
         typedef T EmptyValueType;
 

Modified: trunk/Source/WTF/wtf/NeverDestroyed.h (155356 => 155357)


--- trunk/Source/WTF/wtf/NeverDestroyed.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/wtf/NeverDestroyed.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -29,7 +29,6 @@
 #include <wtf/Alignment.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/StdLibExtras.h>
-#include <wtf/TypeTraits.h>
 
 // NeverDestroyed is a smart pointer like class who ensures that the destructor
 // for the given object is never called, but doesn't use the heap to allocate it.
@@ -75,7 +74,7 @@
     NeverDestroyed& operator=(NeverDestroyed&&) WTF_DELETED_FUNCTION;
 #endif
 
-    typedef typename WTF::RemoveConst<T>::Type *PointerType;
+    typedef typename std::remove_const<T>::type *PointerType;
 
     PointerType asPtr() { return reinterpret_cast<PointerType>(&m_storage); }
 

Modified: trunk/Source/WTF/wtf/OwnPtr.h (155356 => 155357)


--- trunk/Source/WTF/wtf/OwnPtr.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/wtf/OwnPtr.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -25,7 +25,6 @@
 #include <wtf/Noncopyable.h>
 #include <wtf/NullPtr.h>
 #include <wtf/OwnPtrCommon.h>
-#include <wtf/TypeTraits.h>
 #include <algorithm>
 #include <memory>
 
@@ -43,7 +42,7 @@
         WTF_MAKE_NONCOPYABLE(OwnPtr);
 #endif
     public:
-        typedef typename RemovePointer<T>::Type ValueType;
+        typedef typename std::remove_pointer<T>::type ValueType;
         typedef ValueType* PtrType;
 
         OwnPtr() : m_ptr(0) { }

Modified: trunk/Source/WTF/wtf/PassOwnPtr.h (155356 => 155357)


--- trunk/Source/WTF/wtf/PassOwnPtr.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/wtf/PassOwnPtr.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -29,7 +29,7 @@
 #include <wtf/Assertions.h>
 #include <wtf/NullPtr.h>
 #include <wtf/OwnPtrCommon.h>
-#include <wtf/TypeTraits.h>
+#include <type_traits>
 
 namespace WTF {
 
@@ -44,7 +44,7 @@
 
     template<typename T> class PassOwnPtr {
     public:
-        typedef typename RemovePointer<T>::Type ValueType;
+        typedef typename std::remove_pointer<T>::type ValueType;
         typedef ValueType* PtrType;
 
         PassOwnPtr() : m_ptr(0) { }
@@ -147,8 +147,8 @@
 
     template<typename T> inline PassOwnPtr<T> adoptPtr(T* ptr)
     {
-        COMPILE_ASSERT(!(IsSubclass<T, RefCountedBase>::value), DoNotUseAdoptPtrWithRefCounted);
-        COMPILE_ASSERT(!(IsSubclass<T, ThreadSafeRefCountedBase>::value), DoNotUseAdoptPtrWithThreadSafeRefCounted);
+        static_assert(!std::is_convertible<T*, RefCountedBase*>::value, "Do not use adoptPtr with RefCounted, use adoptPtr!");
+        static_assert(!std::is_convertible<T*, ThreadSafeRefCountedBase*>::value, "Do not use adoptPtr with ThreadSafeRefCounted, use adoptPtr!");
 
         return PassOwnPtr<T>(ptr);
     }

Modified: trunk/Source/WTF/wtf/RetainPtr.h (155356 => 155357)


--- trunk/Source/WTF/wtf/RetainPtr.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WTF/wtf/RetainPtr.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -25,7 +25,6 @@
 
 #include <wtf/HashTraits.h>
 #include <wtf/NullPtr.h>
-#include <wtf/TypeTraits.h>
 #include <algorithm>
 
 #if USE(CF)
@@ -75,7 +74,7 @@
 
     template<typename T> class RetainPtr {
     public:
-        typedef typename RemovePointer<T>::Type ValueType;
+        typedef typename std::remove_pointer<T>::type ValueType;
         typedef ValueType* PtrType;
         typedef CFTypeRef StorageType;
 

Modified: trunk/Source/WebKit2/ChangeLog (155356 => 155357)


--- trunk/Source/WebKit2/ChangeLog	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/ChangeLog	2013-09-09 17:10:19 UTC (rev 155357)
@@ -1,3 +1,20 @@
+2013-09-08  Anders Carlsson  <[email protected]>
+
+        Begin moving off of TypeTraits.h
+        https://bugs.webkit.org/show_bug.cgi?id=121006
+
+        Reviewed by Darin Adler.
+
+        Convert uses of WTF type traits to STL type traits.
+
+        * Platform/CoreIPC/ArgumentCoder.h:
+        * Platform/CoreIPC/ArgumentCoders.h:
+        * Platform/CoreIPC/ArgumentDecoder.h:
+        * Platform/CoreIPC/ArgumentEncoder.h:
+        * Platform/CoreIPC/Arguments.h:
+        * Shared/API/c/WKSharedAPICast.h:
+        (WebKit::toImpl):
+
 2013-09-09  Gustavo Noronha Silva  <[email protected]>
 
         Unreviewed build fix.

Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h (155356 => 155357)


--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -26,8 +26,6 @@
 #ifndef ArgumentCoder_h
 #define ArgumentCoder_h
 
-#include <wtf/TypeTraits.h>
-
 namespace CoreIPC {
 
 class ArgumentDecoder;

Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h (155356 => 155357)


--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -31,7 +31,6 @@
 #include <utility>
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
-#include <wtf/TypeTraits.h>
 #include <wtf/Vector.h>
 
 namespace CoreIPC {

Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h (155356 => 155357)


--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -29,7 +29,6 @@
 #include "ArgumentCoder.h"
 #include "Attachment.h"
 #include <wtf/PassOwnPtr.h>
-#include <wtf/TypeTraits.h>
 #include <wtf/Vector.h>
 
 namespace CoreIPC {

Modified: trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h (155356 => 155357)


--- trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/Platform/CoreIPC/ArgumentEncoder.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -29,7 +29,6 @@
 #include "ArgumentCoder.h"
 #include "Attachment.h"
 #include <wtf/PassOwnPtr.h>
-#include <wtf/TypeTraits.h>
 #include <wtf/Vector.h>
 
 namespace CoreIPC {

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Arguments.h (155356 => 155357)


--- trunk/Source/WebKit2/Platform/CoreIPC/Arguments.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Arguments.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -28,7 +28,6 @@
 
 #include "ArgumentDecoder.h"
 #include "ArgumentEncoder.h"
-#include <wtf/TypeTraits.h>
 
 namespace CoreIPC {
     
@@ -46,7 +45,7 @@
 };
 
 template<typename T1> struct Arguments1 {
-    typedef Arguments1<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type> ValueType;
+    typedef Arguments1<typename std::remove_const<typename std::remove_reference<T1>::type>::type> ValueType;
 
     Arguments1()
     {
@@ -71,8 +70,8 @@
 };
     
 template<typename T1, typename T2> struct Arguments2 : Arguments1<T1> {
-    typedef Arguments2<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type> ValueType;
+    typedef Arguments2<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T2>::type>::type> ValueType;
 
     Arguments2() 
     {
@@ -102,9 +101,9 @@
 };
 
 template<typename T1, typename T2, typename T3> struct Arguments3 : Arguments2<T1, T2> {
-    typedef Arguments3<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type> ValueType;
+    typedef Arguments3<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T3>::type>::type> ValueType;
 
     Arguments3()
     {
@@ -134,10 +133,10 @@
 };
 
 template<typename T1, typename T2, typename T3, typename T4> struct Arguments4 : Arguments3<T1, T2, T3> {
-    typedef Arguments4<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T4>::Type>::Type> ValueType;
+    typedef Arguments4<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T3>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T4>::type>::type> ValueType;
 
     Arguments4()
     {
@@ -167,11 +166,11 @@
 };
 
 template<typename T1, typename T2, typename T3, typename T4, typename T5> struct Arguments5 : Arguments4<T1, T2, T3, T4> {
-    typedef Arguments5<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T4>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T5>::Type>::Type> ValueType;
+    typedef Arguments5<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T3>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T4>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T5>::type>::type> ValueType;
 
     Arguments5()
     {
@@ -201,12 +200,12 @@
 };
 
 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> struct Arguments6 : Arguments5<T1, T2, T3, T4, T5> {
-    typedef Arguments6<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T4>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T5>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T6>::Type>::Type> ValueType;
+    typedef Arguments6<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T3>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T4>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T5>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T6>::type>::type> ValueType;
 
     Arguments6()
     {
@@ -236,13 +235,13 @@
 };
 
 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> struct Arguments7 : Arguments6<T1, T2, T3, T4, T5, T6> {
-    typedef Arguments7<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T4>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T5>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T6>::Type>::Type,
-                       typename WTF::RemoveConst<typename WTF::RemoveReference<T7>::Type>::Type> ValueType;
+    typedef Arguments7<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T3>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T4>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T5>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T6>::type>::type,
+                       typename std::remove_const<typename std::remove_reference<T7>::type>::type> ValueType;
 
     Arguments7()
     {
@@ -272,14 +271,14 @@
 };
 
 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> struct Arguments8 : Arguments7<T1, T2, T3, T4, T5, T6, T7> {
-    typedef Arguments8<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T4>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T5>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T6>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T7>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T8>::Type>::Type> ValueType;
+    typedef Arguments8<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T3>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T4>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T5>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T6>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T7>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T8>::type>::type> ValueType;
 
     Arguments8() { }
     
@@ -307,16 +306,16 @@
 };
 
 template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> struct Arguments10 : Arguments8<T1, T2, T3, T4, T5, T6, T7, T8> {
-    typedef Arguments10<typename WTF::RemoveConst<typename WTF::RemoveReference<T1>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T2>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T3>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T4>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T5>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T6>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T7>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T8>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T9>::Type>::Type,
-    typename WTF::RemoveConst<typename WTF::RemoveReference<T10>::Type>::Type> ValueType;
+    typedef Arguments10<typename std::remove_const<typename std::remove_reference<T1>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T2>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T3>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T4>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T5>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T6>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T7>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T8>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T9>::type>::type,
+    typename std::remove_const<typename std::remove_reference<T10>::type>::type> ValueType;
 
     Arguments10() { }
     

Modified: trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (155356 => 155357)


--- trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h	2013-09-09 16:58:20 UTC (rev 155356)
+++ trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h	2013-09-09 17:10:19 UTC (rev 155357)
@@ -55,7 +55,6 @@
 #include <WebCore/SecurityOrigin.h>
 #include <WebCore/UserContentTypes.h>
 #include <WebCore/UserScriptTypes.h>
-#include <wtf/TypeTraits.h>
 
 namespace WebKit {
 
@@ -142,8 +141,8 @@
     // An example of the conversions that take place:
     // const struct OpaqueWKArray* -> const struct OpaqueWKArray -> struct OpaqueWKArray -> struct OpaqueWKArray* -> ImmutableArray*
     
-    typedef typename WTF::RemovePointer<T>::Type PotentiallyConstValueType;
-    typedef typename WTF::RemoveConst<PotentiallyConstValueType>::Type NonConstValueType;
+    typedef typename std::remove_pointer<T>::type PotentiallyConstValueType;
+    typedef typename std::remove_const<PotentiallyConstValueType>::type NonConstValueType;
 
     return reinterpret_cast<typename APITypeInfo<T>::ImplType>(const_cast<NonConstValueType*>(t));
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to