mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
This reverts commit3c54d5ec5e. The reverted change fixed the FTBFS of the test in question with Clang 16, which rightly stopped convert the LHS of `"hello" == sstring{"hello"}` to the type of the type acceptable by the member operator even we have a constructor for this conversion, like class sstring { public: bar_t(const char*); bool operator==(const sstring&) const; bool operator!=(const sstring&) const; }; because we have an operator!=, as per the draft of C++ standard https://eel.is/c++draft/over.match.oper#4 : > A non-template function or function template F named operator== > is a rewrite target with first operand o unless a search for the > name operator!= in the scope S from the instantiation context of > the operator expression finds a function or function template > that would correspond ([basic.scope.scope]) to F if its name were > operator==, where S is the scope of the class type of o if F is a > class member, and the namespace scope of which F is a member > otherwise. in397f4b51c3, the seastar submodule was updated. in which, we now have a dedicated overload for the `const char*` case. so the compiler is now able to compile the expression like `"hello" == sstring{"hello"}` in C++20 now. so, in this change, the workaround is reverted. Closes #14040
9.2 KiB
9.2 KiB