]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/util/testsuite_character.h
stl_algo.h: Add return type information to comments.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / util / testsuite_character.h
index 547775bd8864155eb8573a61d05e8c87cc495da8..dd33525da6cb1c901cf449536c4beca22875ad9b 100644 (file)
@@ -46,6 +46,8 @@ namespace __gnu_test
     int value;
   };
   
+  // For 20.1 requirements for instantiable type: equality comparable
+  // and less than comparable.
   inline bool
   operator==(const pod_int& lhs, const pod_int& rhs)
   { return lhs.value == rhs.value; }
@@ -54,6 +56,29 @@ namespace __gnu_test
   operator<(const pod_int& lhs, const pod_int& rhs)
   { return lhs.value < rhs.value; }
 
+  // For 26 numeric algorithms requirements, need addable,
+  // subtractable, multiplicable.
+  inline pod_int
+  operator+(const pod_int& lhs, const pod_int& rhs)
+  {
+    pod_int ret = { lhs.value + rhs.value };
+    return ret;
+  }
+
+  inline pod_int
+  operator-(const pod_int& lhs, const pod_int& rhs)
+  { 
+    pod_int ret = { lhs.value - rhs.value };
+    return ret;
+  }
+
+  inline pod_int
+  operator*(const pod_int& lhs, const pod_int& rhs)
+  { 
+    pod_int ret = { lhs.value * rhs.value };
+    return ret;
+  }
+
   struct pod_state
   {
     unsigned long value;