diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2022-10-21 15:53:20 +0200 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-11-06 10:25:08 -0700 |
commit | 4296425bd8f2212e70167118e5a76c4922565080 (patch) | |
tree | 5574318cc583989f1a3b3b96043a23b101d24b91 /AK/Utf32View.h | |
parent | 4e406b07305007c84cef637f5753c196c34fac9c (diff) | |
download | serenity-4296425bd8f2212e70167118e5a76c4922565080.zip |
Everywhere: Remove redundant inequality comparison operators
C++20 can automatically synthesize `operator!=` from `operator==`, so
there is no point in writing such functions by hand if all they do is
call through to `operator==`.
This fixes a compile error with compilers that implement P2468 (Clang
16 currently). This paper restores the C++17 behavior that if both
`T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be
rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators
makes the rewriting possible again.
See https://reviews.llvm.org/D134529#3853062
Diffstat (limited to 'AK/Utf32View.h')
-rw-r--r-- | AK/Utf32View.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/AK/Utf32View.h b/AK/Utf32View.h index 249407f8c5..7cbaa1f6db 100644 --- a/AK/Utf32View.h +++ b/AK/Utf32View.h @@ -25,10 +25,6 @@ public: { return m_ptr == other.m_ptr && m_length == other.m_length; } - bool operator!=(Utf32CodePointIterator const& other) const - { - return !(*this == other); - } Utf32CodePointIterator& operator++() { VERIFY(m_length > 0); |