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/Min.h | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 impl/Min.h (limited to 'impl/Min.h') diff --git a/impl/Min.h b/impl/Min.h deleted file mode 100644 index 9f17545..0000000 --- a/impl/Min.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MIN_H -#define MIN_H - -#include "Expression.h" - -template -struct Min : public Expression { - Min(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 ? left : right; - } - - private: - Expression* _left; - Expression* _right; -}; - -#endif -- cgit v1.2.3