summaryrefslogtreecommitdiff
path: root/Sum.h
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@carlo-laptop>2012-04-06 14:02:26 +1000
committerCarlo Zancanaro <carlo@carlo-laptop>2012-04-06 14:02:26 +1000
commit5d7252681da3b26845fc4e5dcf0b0e94ed9fabb1 (patch)
tree20bc0a6b62390aabda0b8c446d3a2177990863f6 /Sum.h
parent83e2c574bdefe2d040cdfbe20a73380a0f0123dd (diff)
Move everything into impl/ and add a Makefile.
Diffstat (limited to 'Sum.h')
-rw-r--r--Sum.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/Sum.h b/Sum.h
deleted file mode 100644
index bf04669..0000000
--- a/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