This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[STLExtras] Add out-of-line definition of friend operator== for C++20…
… (#72348) The last attempt at llvm/llvm-project#72220 was reverted by llvm/llvm-project@94d6699 because it breaks C++20 build in clang-17 and before. This is a workaround of llvm/llvm-project#70210 and unblocks llvm/llvm-project#72213 which rectifies rewriting template operator and thus introduces new breakages. Moving the function definition out of the class makes clang find a matching `operator!=` for the `operator==`. This makes clang not rewrite the `operator==` with reversed args. Hence, the ambiguity is resolved. The final plan, when llvm/llvm-project#70210 is fixed, is to move these back to inline definition or even convert to a member template operator. This should not be urgent and could even wait for a major clang release including llvm/llvm-project#72213
- Loading branch information