summaryrefslogtreecommitdiff
path: root/lib/height.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-30 07:41:23 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-30 07:41:23 -0400
commit95b4257a4df36516e192d72b12da8673f6af3081 (patch)
treec348429b4293758d6e96e2897e3d620e89c38d78 /lib/height.h
parentfc242f52e835be85cc6030b6cae5619d18df7670 (diff)
downloadc++-95b4257a4df36516e192d72b12da8673f6af3081.tar.gz
c++-95b4257a4df36516e192d72b12da8673f6af3081.tar.bz2
c++-95b4257a4df36516e192d72b12da8673f6af3081.zip
everything builds with new - operators defined
Diffstat (limited to 'lib/height.h')
-rw-r--r--lib/height.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/height.h b/lib/height.h
index a4cbbed..d2173fe 100644
--- a/lib/height.h
+++ b/lib/height.h
@@ -44,6 +44,10 @@ struct height_t {
inline double operator*(double a) const {
return x * a;
}
+
+ inline T operator-(const height_t& h) const {
+ return x - h.x;
+ }
};
template <class T>