summaryrefslogtreecommitdiff
path: root/impl/Variable.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/Variable.hpp')
-rw-r--r--impl/Variable.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/impl/Variable.hpp b/impl/Variable.hpp
index 0ba13e9..2386e7a 100644
--- a/impl/Variable.hpp
+++ b/impl/Variable.hpp
@@ -5,18 +5,19 @@
template<typename T>
struct Variable : public Operator<T> {
+ Variable(unsigned int id)
+ : _id(id) { }
+ Variable(const Variable& other)
+ : _id(other._id) { }
unsigned int id() const {
return _id;
}
- unsigned int id(unsigned int id) {
- return (_id = id);
- }
T operator() (const std::vector< Expression<T>* >& args, const VariableAssignment<T>& ass) const {
//assert(args.size() == 0)
return ass[*this];
}
private:
- unsigned int _id;
+ const unsigned int _id;
};
#endif