diff --git a/test/common/aggregate.h b/test/common/aggregate.h index 7b3176af4..5c007a65c 100644 --- a/test/common/aggregate.h +++ b/test/common/aggregate.h @@ -9,11 +9,11 @@ struct aggregate { int value{}; }; -inline bool operator==(const aggregate &lhs, const aggregate &rhs) { +[[nodiscard]] inline bool operator==(const aggregate &lhs, const aggregate &rhs) { return lhs.value == rhs.value; } -inline bool operator<(const aggregate &lhs, const aggregate &rhs) { +[[nodiscard]] inline bool operator<(const aggregate &lhs, const aggregate &rhs) { return lhs.value < rhs.value; } diff --git a/test/common/pointer_stable.h b/test/common/pointer_stable.h index f4836b7c3..abf88bae1 100644 --- a/test/common/pointer_stable.h +++ b/test/common/pointer_stable.h @@ -8,11 +8,11 @@ struct pointer_stable { int value{}; }; -inline bool operator==(const pointer_stable &lhs, const pointer_stable &rhs) { +[[nodiscard]] inline bool operator==(const pointer_stable &lhs, const pointer_stable &rhs) { return lhs.value == rhs.value; } -inline bool operator<(const pointer_stable &lhs, const pointer_stable &rhs) { +[[nodiscard]] inline bool operator<(const pointer_stable &lhs, const pointer_stable &rhs) { return lhs.value < rhs.value; }