Make operator<=> static

Apparently this counts as "namespace scope" (as opposed to an anonymous
namespace), and it still won't be visible outside the translation unit.
This commit is contained in:
2024-01-17 17:12:07 -08:00
parent 9f9c248e6a
commit 3e16b30253

View File

@@ -8,7 +8,7 @@
using Key = ConflictSet::Key;
auto operator<=>(const Key &lhs, const Key &rhs) {
static auto operator<=>(const Key &lhs, const Key &rhs) {
const int minLen = std::min(lhs.len, rhs.len);
const int c = memcmp(lhs.p, rhs.p, minLen);
return c != 0 ? c <=> 0 : lhs.len <=> rhs.len;