`std::result_of` was removed in C++20, but is still used in the Swift headers. We can't remove it from there before prebuilding, as that is still done with C++14, but we can replace it with `std::invoke_result` for compiling the extractor. diff --git a/include/swift/Basic/RelativePointer.h b/include/swift/Basic/RelativePointer.h index 73f91262afa..bdaa304c804 100644 --- a/include/swift/Basic/RelativePointer.h +++ b/include/swift/Basic/RelativePointer.h @@ -551,7 +551,7 @@ public: } template - typename std::result_of::type operator()(ArgTy... arg) const { + typename std::invoke_result::type operator()(ArgTy... arg) const { #if SWIFT_PTRAUTH void *ptr = this->super::getWithoutCast(); return reinterpret_cast(ptrauth_sign_unauthenticated( diff --git a/include/swift/Basic/STLExtras.h b/include/swift/Basic/STLExtras.h index 7fa3d0c8890..6bc891a9b63 100644 --- a/include/swift/Basic/STLExtras.h +++ b/include/swift/Basic/STLExtras.h @@ -405,7 +405,7 @@ class OptionalTransformIterator { typename std::iterator_traits::reference; using ResultReference = - typename std::result_of::type; + typename std::invoke_result::type; public: /// Used to indicate when the current iterator has already been