diff options
Diffstat (limited to 'impl/Sum.h')
-rw-r--r-- | impl/Sum.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/impl/Sum.h b/impl/Sum.h deleted file mode 100644 index bf04669..0000000 --- a/impl/Sum.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef SUM_H -#define SUM_H - -#include "Expression.h" - -template<class T> -struct Sum : public Expression<T> { - Sum(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; - } - - private: - Expression<T>* _left; - Expression<T>* _right; -}; - -#endif |