summaryrefslogtreecommitdiffstats
path: root/metrics
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-09-26 13:02:59 +0000
committerArne Juul <arnej@yahoo-inc.com>2018-09-26 13:02:59 +0000
commitd3b021f8074e2d613eaf0e4e239ae557b43804f9 (patch)
treeda73c889988ea1c22d418380fdd097e7ad3b1ee1 /metrics
parentfd7ad12f8ca32c2dda024383822935fac2ff7e67 (diff)
avoid "clever" operator++ overload
Diffstat (limited to 'metrics')
-rw-r--r--metrics/src/vespa/metrics/countmetric.h5
-rw-r--r--metrics/src/vespa/metrics/countmetric.hpp16
2 files changed, 0 insertions, 21 deletions
diff --git a/metrics/src/vespa/metrics/countmetric.h b/metrics/src/vespa/metrics/countmetric.h
index dd4c9e6fc92..912fc52449b 100644
--- a/metrics/src/vespa/metrics/countmetric.h
+++ b/metrics/src/vespa/metrics/countmetric.h
@@ -78,11 +78,6 @@ public:
void set(T value);
void inc(T value = 1);
void dec(T value = 1);
- CountMetric & operator++() { inc(); return *this; }
- CountMetric & operator--() { dec(); return *this; }
-
- CountMetric operator++(int);
- CountMetric operator--(int);
CountMetric & operator+=(const CountMetric &);
CountMetric & operator-=(const CountMetric &);
diff --git a/metrics/src/vespa/metrics/countmetric.hpp b/metrics/src/vespa/metrics/countmetric.hpp
index 516f6c660b6..e150ce0d632 100644
--- a/metrics/src/vespa/metrics/countmetric.hpp
+++ b/metrics/src/vespa/metrics/countmetric.hpp
@@ -75,22 +75,6 @@ CountMetric<T, SumOnAdd>::operator-=(const CountMetric<T, SumOnAdd>& other)
}
template <typename T, bool SumOnAdd>
-CountMetric<T, SumOnAdd>
-CountMetric<T, SumOnAdd>:: operator++(int) {
- CountMetric tmp(*this);
- inc();
- return tmp;
-}
-
-template <typename T, bool SumOnAdd>
-CountMetric<T, SumOnAdd>
-CountMetric<T, SumOnAdd>::operator--(int) {
- CountMetric tmp(*this);
- inc();
- return tmp;
-}
-
-template <typename T, bool SumOnAdd>
void
CountMetric<T, SumOnAdd>::set(T value)
{