Tracked(T v): value(v), set(false) { }
Tracked &operator=(const Tracked &v) { if(v.set) { value = v.value; set = true; } return *this; }
- Tracked &operator=(T v) { value = v; set = true; return *this; }
- operator T() const { return value; }
+ Tracked &operator=(const T &v) { value = v; set = true; return *this; }
+ operator const T &() const { return value; }
};
typedef std::map<std::string, std::string> DefineMap;