diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index 52610e7de187..ebd3a4542361 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -73,6 +73,8 @@ Changes to the LLVM IR Changes to LLVM infrastructure ------------------------------ +* Minimum Clang version to build LLVM in C++20 configuration has been updated to clang-17.0.6. + Changes to building LLVM ------------------------ diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index 18bc4d108b15..a136eeb0ff1b 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -1290,18 +1290,6 @@ class indexed_accessor_range_base { return (*this)[size() - 1]; } - /// Compare this range with another. - template - friend bool operator==(const indexed_accessor_range_base &lhs, - const OtherT &rhs) { - return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); - } - template - friend bool operator!=(const indexed_accessor_range_base &lhs, - const OtherT &rhs) { - return !(lhs == rhs); - } - /// Return the size of this range. size_t size() const { return count; } @@ -1364,6 +1352,23 @@ class indexed_accessor_range_base { /// The size from the owning range. ptrdiff_t count; }; +/// Compare this range with another. +/// FIXME: Make me a member function instead of friend when it works in C++20. +template +bool operator==(const indexed_accessor_range_base &lhs, + const OtherT &rhs) { + return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); +} + +template +bool operator!=(const indexed_accessor_range_base &lhs, + const OtherT &rhs) { + return !(lhs == rhs); +} } // end namespace detail /// This class provides an implementation of a range of