summaryrefslogtreecommitdiff
path: root/impl/Max.h
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Max.h')
-rw-r--r--impl/Max.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/impl/Max.h b/impl/Max.h
deleted file mode 100644
index b3b5d65..0000000
--- a/impl/Max.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef MAX_H
-#define MAX_H
-
-#include "Expression.h"
-
-template<class T>
-struct Max : public Expression<T> {
- Max(Expression<T>* left, Expression<T>* right)
- : _left(left), _right(right) { }
-
- T eval(const std::map<std::string, T>& mappings) const {
- T left = _left->eval(mappings);
- T right = _right->eval(mappings);
- return left < right ? right : left;
- }
-
- private:
- Expression<T>* _left;
- Expression<T>* _right;
-};
-
-#endif