Title: [284187] trunk/Source
Revision
284187
Author
[email protected]
Date
2021-10-14 11:50:43 -0700 (Thu, 14 Oct 2021)

Log Message

Unreviewed build fix with recent SDKs.

Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.

Source/_javascript_Core:

* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::getPropertySlot const):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::getPropertySlot const):
* runtime/ParseInt.h:
(JSC::toStringView):

Source/WTF:

* wtf/IndexedContainerIterator.h:
(WTF::IndexedContainerIterator::operator* const):
(WTF::IndexedContainerIterator::operator*): Deleted.
* wtf/Vector.h:
* wtf/WeakHashSet.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (284186 => 284187)


--- trunk/Source/_javascript_Core/ChangeLog	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-10-14 18:50:43 UTC (rev 284187)
@@ -1,3 +1,18 @@
+2021-10-14  Chris Dumez  <[email protected]>
+
+        Unreviewed build fix with recent SDKs.
+
+        Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.
+
+        * runtime/JSCJSValue.h:
+        * runtime/JSCJSValueInlines.h:
+        (JSC::JSValue::getPropertySlot const):
+        * runtime/JSObject.h:
+        * runtime/JSObjectInlines.h:
+        (JSC::JSObject::getPropertySlot const):
+        * runtime/ParseInt.h:
+        (JSC::toStringView):
+
 2021-10-14  Zan Dobersek  <[email protected]>
 
         [RISCV64] Support logical operations with immediates on BaseIndex addresses in LLInt

Modified: trunk/Source/_javascript_Core/heap/IsoSubspace.h (284186 => 284187)


--- trunk/Source/_javascript_Core/heap/IsoSubspace.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/heap/IsoSubspace.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -82,7 +82,7 @@
 
 template<typename T>
 struct isAllocatedFromIsoSubspace {
-    static constexpr bool value = std::is_same<std::result_of_t<decltype(T::template subspaceFor<T, SubspaceAccess::OnMainThread>)&(VM&)>, IsoSubspace*>::value;
+    static constexpr bool value = std::is_same<std::invoke_result_t<decltype(T::template subspaceFor<T, SubspaceAccess::OnMainThread>)&, VM&>, IsoSubspace*>::value;
 };
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/JSCJSValue.h (284186 => 284187)


--- trunk/Source/_javascript_Core/runtime/JSCJSValue.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/runtime/JSCJSValue.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -321,8 +321,8 @@
     T getAs(JSGlobalObject*, PropertyNameType) const;
 
     bool getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&) const;
-    template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
-    template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
+    template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
+    template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
 
     bool getOwnPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&) const;
 

Modified: trunk/Source/_javascript_Core/runtime/JSCJSValueInlines.h (284186 => 284187)


--- trunk/Source/_javascript_Core/runtime/JSCJSValueInlines.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/runtime/JSCJSValueInlines.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -951,7 +951,7 @@
 }
 
 template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
 {
     PropertySlot slot(asValue(), PropertySlot::InternalMethodType::Get);
     return getPropertySlot(globalObject, propertyName, slot, callback);
@@ -958,7 +958,7 @@
 }
 
 template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
 {
     auto scope = DECLARE_THROW_SCOPE(getVM(globalObject));
     bool found = getPropertySlot(globalObject, propertyName, slot);

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (284186 => 284187)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -159,8 +159,8 @@
     bool getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&);
     bool getPropertySlot(JSGlobalObject*, unsigned propertyName, PropertySlot&);
     bool getPropertySlot(JSGlobalObject*, uint64_t propertyName, PropertySlot&);
-    template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
-    template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
+    template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
+    template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
 
     JSValue getIfPropertyExists(JSGlobalObject*, PropertyName);
 

Modified: trunk/Source/_javascript_Core/runtime/JSObjectInlines.h (284186 => 284187)


--- trunk/Source/_javascript_Core/runtime/JSObjectInlines.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/runtime/JSObjectInlines.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -90,7 +90,7 @@
 }
 
 template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
 {
     PropertySlot slot(this, PropertySlot::InternalMethodType::Get);
     return getPropertySlot(globalObject, propertyName, slot, callback);
@@ -97,7 +97,7 @@
 }
 
 template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
 {
     VM& vm = getVM(globalObject);
     auto scope = DECLARE_THROW_SCOPE(vm);

Modified: trunk/Source/_javascript_Core/runtime/ParseInt.h (284186 => 284187)


--- trunk/Source/_javascript_Core/runtime/ParseInt.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/_javascript_Core/runtime/ParseInt.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -198,7 +198,7 @@
 }
 
 template<typename CallbackWhenNoException>
-static ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(StringView)>::type toStringView(JSGlobalObject* globalObject, JSValue value, CallbackWhenNoException callback)
+static ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, StringView>::type toStringView(JSGlobalObject* globalObject, JSValue value, CallbackWhenNoException callback)
 {
     VM& vm = getVM(globalObject);
     auto scope = DECLARE_THROW_SCOPE(vm);

Modified: trunk/Source/WTF/ChangeLog (284186 => 284187)


--- trunk/Source/WTF/ChangeLog	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/WTF/ChangeLog	2021-10-14 18:50:43 UTC (rev 284187)
@@ -1,3 +1,15 @@
+2021-10-14  Chris Dumez  <[email protected]>
+
+        Unreviewed build fix with recent SDKs.
+
+        Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.
+
+        * wtf/IndexedContainerIterator.h:
+        (WTF::IndexedContainerIterator::operator* const):
+        (WTF::IndexedContainerIterator::operator*): Deleted.
+        * wtf/Vector.h:
+        * wtf/WeakHashSet.h:
+
 2021-10-14  Yusuke Suzuki  <[email protected]>
 
         Remove std::iterator usage

Modified: trunk/Source/WTF/wtf/IndexedContainerIterator.h (284186 => 284187)


--- trunk/Source/WTF/wtf/IndexedContainerIterator.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/WTF/wtf/IndexedContainerIterator.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -45,7 +45,7 @@
     {
     }
 
-    auto operator*() -> typename std::result_of<decltype(&Container::at)(const Container, unsigned)>::type
+    auto operator*() -> typename std::invoke_result<decltype(&Container::at), const Container, unsigned>::type
     {
         return m_container->at(m_index);
     }

Modified: trunk/Source/WTF/wtf/Vector.h (284186 => 284187)


--- trunk/Source/WTF/wtf/Vector.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/WTF/wtf/Vector.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -838,7 +838,7 @@
 
     void checkConsistency();
 
-    template<typename MapFunction, typename R = typename std::result_of<MapFunction(const T&)>::type> Vector<R> map(MapFunction) const;
+    template<typename MapFunction, typename R = typename std::invoke_result<MapFunction, const T&>::type> Vector<R> map(MapFunction) const;
 
     bool isHashTableDeletedValue() const { return m_size == std::numeric_limits<decltype(m_size)>::max(); }
 
@@ -1675,7 +1675,7 @@
 template<typename MapFunction, typename SourceType, typename Enable = void>
 struct Mapper {
     using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
-    using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
+    using DestinationItemType = typename std::invoke_result<MapFunction, SourceItemType&>::type;
 
     static Vector<DestinationItemType> map(SourceType source, const MapFunction& mapFunction)
     {
@@ -1691,7 +1691,7 @@
 template<typename MapFunction, typename SourceType>
 struct Mapper<MapFunction, SourceType, typename std::enable_if<std::is_rvalue_reference<SourceType&&>::value>::type> {
     using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
-    using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&&)>::type;
+    using DestinationItemType = typename std::invoke_result<MapFunction, SourceItemType&&>::type;
 
     static Vector<DestinationItemType> map(SourceType&& source, const MapFunction& mapFunction)
     {
@@ -1734,7 +1734,7 @@
 template<typename MapFunction, typename SourceType, typename Enable = void>
 struct CompactMapper {
     using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
-    using ResultItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
+    using ResultItemType = typename std::invoke_result<MapFunction, SourceItemType&>::type;
     using DestinationItemType = typename CompactMapTraits<ResultItemType>::ItemType;
 
     static Vector<DestinationItemType> compactMap(SourceType source, const MapFunction& mapFunction)
@@ -1753,7 +1753,7 @@
 template<typename MapFunction, typename SourceType>
 struct CompactMapper<MapFunction, SourceType, typename std::enable_if<std::is_rvalue_reference<SourceType&&>::value>::type> {
     using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
-    using ResultItemType = typename std::result_of<MapFunction(SourceItemType&&)>::type;
+    using ResultItemType = typename std::invoke_result<MapFunction, SourceItemType&&>::type;
     using DestinationItemType = typename CompactMapTraits<ResultItemType>::ItemType;
 
     static Vector<DestinationItemType> compactMap(SourceType source, const MapFunction& mapFunction)

Modified: trunk/Source/WTF/wtf/WeakHashSet.h (284186 => 284187)


--- trunk/Source/WTF/wtf/WeakHashSet.h	2021-10-14 18:46:17 UTC (rev 284186)
+++ trunk/Source/WTF/wtf/WeakHashSet.h	2021-10-14 18:50:43 UTC (rev 284187)
@@ -161,7 +161,7 @@
 template<typename MapFunction, typename T>
 struct Mapper<MapFunction, const WeakHashSet<T> &, void> {
     using SourceItemType = T&;
-    using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
+    using DestinationItemType = typename std::invoke_result<MapFunction, SourceItemType&>::type;
 
     static Vector<DestinationItemType> map(const WeakHashSet<T>& source, const MapFunction& mapFunction)
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to