Procházet zdrojové kódy

test: minor changes

Michele Caini před 1 rokem
rodič
revize
e2648e418f
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  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{};
     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;
     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;
     return lhs.value < rhs.value;
 }
 }
 
 

+ 2 - 2
test/common/pointer_stable.h

@@ -8,11 +8,11 @@ struct pointer_stable {
     int value{};
     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;
     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;
     return lhs.value < rhs.value;
 }
 }