Skip to content

Commit

Permalink
Fix test issue caused by move to C++20 (#1245)
Browse files Browse the repository at this point in the history
* Fix test issue caused by move to C++20

* Use spaceship operator as is the style of the time

* lint

* Add include
  • Loading branch information
mlw authored Nov 29, 2023
1 parent d503eae commit c16f90f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/common/SantaCacheTest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#import <XCTest/XCTest.h>

#include <compare>
#include <numeric>
#include <string>
#include <vector>
Expand Down Expand Up @@ -245,9 +246,7 @@ - (void)testCompareAndSwap {
uint64_t first_val;
uint64_t second_val;

bool operator==(const S &rhs) {
return first_val == rhs.first_val && second_val == rhs.second_val;
}
auto operator<=>(const S &rhs) const = default;
};
template <>
uint64_t SantaCacheHasher<S>(S const &s) {
Expand Down

0 comments on commit c16f90f

Please sign in to comment.