浏览代码

Fix compiler bug in Incrementable/Decrementable.

Sam Jaffe 5 年之前
父节点
当前提交
09efd4ee29
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      include/opaque_typedef/arithmatic.hpp

+ 4 - 4
include/opaque_typedef/arithmatic.hpp

@@ -3,24 +3,24 @@
 namespace types {
   template <typename Self>
   struct Incrementable {
-    friend Self operator++(Self const & self, int) {
+    friend Self operator++(Self & self, int) {
       Self copy = self;
       self = Self(self.get() + 1);
       return copy;
     }
-    friend Self & operator++(Self const & self) {
+    friend Self & operator++(Self & self) {
       return self = Self(self.get() + 1);
     }
   };
 
   template <typename Self>
   struct Decrementable {
-    friend Self operator--(Self const & self, int) {
+    friend Self operator--(Self & self, int) {
       Self copy = self;
       self = Self(self.get() - 1);
       return copy;
     }
-    friend Self & operator--(Self const & self) {
+    friend Self & operator--(Self & self) {
       return self = Self(self.get() - 1);
     }
   };