summaryrefslogtreecommitdiff
path: root/impl/Operator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Operator.hpp')
-rw-r--r--impl/Operator.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/impl/Operator.hpp b/impl/Operator.hpp
index 3e11443..71a1e68 100644
--- a/impl/Operator.hpp
+++ b/impl/Operator.hpp
@@ -58,6 +58,13 @@ struct Constant : public Operator<T> {
const T _value;
};
+template<typename T>
+struct Increment: public Operator<T> {
+ T operator() (const std::vector< Expression<T>* >& args, const VariableAssignment<T>& ass) const {
+ return (*args[0])(ass) + 1;
+ }
+};
+
#include "VariableAssignment.hpp"
#include "Expression.hpp"