[llvm] [STLExtras] Add out-of-line definition of friend operator== for C++20 (PR #72348)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 03:39:27 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3f743fd3a319c3b142d989b4d986e3b11fe8109f c8d3c272564f0c8d2c43c501506913c7f05a3eda -- llvm/include/llvm/ADT/STLExtras.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index ecaa7cce15..a136eeb0ff 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -1356,16 +1356,16 @@ protected:
/// FIXME: Make me a member function instead of friend when it works in C++20.
template <typename OtherT, typename DerivedT, typename BaseT, typename T,
typename PointerT, typename ReferenceT>
-bool operator==(const indexed_accessor_range_base<DerivedT, BaseT, T,
- PointerT, ReferenceT> &lhs,
+bool operator==(const indexed_accessor_range_base<DerivedT, BaseT, T, PointerT,
+ ReferenceT> &lhs,
const OtherT &rhs) {
return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
}
template <typename OtherT, typename DerivedT, typename BaseT, typename T,
typename PointerT, typename ReferenceT>
-bool operator!=(const indexed_accessor_range_base<DerivedT, BaseT, T,
- PointerT, ReferenceT> &lhs,
+bool operator!=(const indexed_accessor_range_base<DerivedT, BaseT, T, PointerT,
+ ReferenceT> &lhs,
const OtherT &rhs) {
return !(lhs == rhs);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/72348
More information about the llvm-commits
mailing list