From 3e16b30253b52b67028b9072a8d45677b91be324 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 17 Jan 2024 17:12:07 -0800 Subject: [PATCH] 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. --- ConflictSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 8d0e85f..5a30aa3 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -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;