|
|
@@ -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);
|
|
|
}
|
|
|
};
|