Răsfoiți Sursa

test: minor changes

Michele Caini 1 an în urmă
părinte
comite
e2648e418f
2 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 2 2
      test/common/aggregate.h
  2. 2 2
      test/common/pointer_stable.h

+ 2 - 2
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;
 }
 

+ 2 - 2
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;
 }