Unreviewed, attempt to fix build failure with VC2017
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Aug 2017 00:36:24 +0000 (00:36 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Aug 2017 00:36:24 +0000 (00:36 +0000)
Source/WTF:

* wtf/PriorityQueue.h:

Tools:

* TestWebKitAPI/Tests/WTF/PriorityQueue.cpp:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/PriorityQueue.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/PriorityQueue.cpp

index 077f23a..4456109 100644 (file)
@@ -1,5 +1,11 @@
 2017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
 
+        Unreviewed, attempt to fix build failure with VC2017
+
+        * wtf/PriorityQueue.h:
+
+2017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
+
         Run more WTF tests
         https://bugs.webkit.org/show_bug.cgi?id=174970
 
index b19d740..f13f192 100644 (file)
@@ -37,7 +37,7 @@ namespace WTF {
 // 2) You can iterate the elements.
 // 3) It has in-place decrease/increaseKey methods, although they are still O(n) rather than O(log(n)).
 
-template<typename T, bool (*isHigherPriority)(const T&, const T&) = isLessThan<T>, size_t inlineCapacity = 0>
+template<typename T, bool (*isHigherPriority)(const T&, const T&) = &isLessThan<T>, size_t inlineCapacity = 0>
 class PriorityQueue {
     using BufferType = Vector<T, inlineCapacity>;
     using const_iterator = typename BufferType::const_iterator;
index 82d23e2..d93fb1d 100644 (file)
@@ -1,5 +1,12 @@
 2017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
 
+        Unreviewed, attempt to fix build failure with VC2017
+
+        * TestWebKitAPI/Tests/WTF/PriorityQueue.cpp:
+        (TEST):
+
+2017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
+
         Unreviewed, suppress warnings on GCC
 
         * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
index 52b4e3f..87d634a 100644 (file)
@@ -76,7 +76,7 @@ TEST(WTF_PriorityQueue, Basic)
 TEST(WTF_PriorityQueue, CustomPriorityFunction)
 {
     const unsigned numElements = 10;
-    PriorityQueue<unsigned, isGreaterThan<unsigned>> queue;
+    PriorityQueue<unsigned, &isGreaterThan<unsigned>> queue;
 
     EXPECT_EQ(0_z, queue.size());
     EXPECT_TRUE(queue.isEmpty());
@@ -106,7 +106,7 @@ struct CompareMove {
 
 TEST(WTF_PriorityQueue, MoveOnly)
 {
-    PriorityQueue<MoveOnly, CompareMove<isLessThan<unsigned>>::compare> queue;
+    PriorityQueue<MoveOnly, &CompareMove<&isLessThan<unsigned>>::compare> queue;
 
     Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     Vector<unsigned> sorted = values;
@@ -123,7 +123,7 @@ TEST(WTF_PriorityQueue, MoveOnly)
 
 TEST(WTF_PriorityQueue, DecreaseKey)
 {
-    PriorityQueue<MoveOnly, CompareMove<isLessThan<unsigned>>::compare> queue;
+    PriorityQueue<MoveOnly, &CompareMove<&isLessThan<unsigned>>::compare> queue;
 
     Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     Vector<unsigned> sorted = values;
@@ -149,7 +149,7 @@ TEST(WTF_PriorityQueue, DecreaseKey)
 
 TEST(WTF_PriorityQueue, IncreaseKey)
 {
-    PriorityQueue<MoveOnly, CompareMove<isGreaterThan<unsigned>>::compare> queue;
+    PriorityQueue<MoveOnly, &CompareMove<&isGreaterThan<unsigned>>::compare> queue;
 
     Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     Vector<unsigned> sorted = values;
@@ -175,7 +175,7 @@ TEST(WTF_PriorityQueue, IncreaseKey)
 
 TEST(WTF_PriorityQueue, Iteration)
 {
-    PriorityQueue<MoveOnly, CompareMove<isGreaterThan<unsigned>>::compare> queue;
+    PriorityQueue<MoveOnly, &CompareMove<&isGreaterThan<unsigned>>::compare> queue;
 
     Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     Vector<unsigned> sorted = values;