From 2ee29b3426d2d79872fba35adbeb8d768983ffec Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 19 Apr 2012 16:21:26 +1000 Subject: Add presentation; start a different implementation --- impl/Max.h | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 impl/Max.h (limited to 'impl/Max.h') 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 -struct Max : public Expression { - Max(Expression* left, Expression* right) - : _left(left), _right(right) { } - - T eval(const std::map& mappings) const { - T left = _left->eval(mappings); - T right = _right->eval(mappings); - return left < right ? right : left; - } - - private: - Expression* _left; - Expression* _right; -}; - -#endif -- cgit v1.2.3