+ Store(const T &d): data(d) { }
+
+ virtual const std::type_info &type_id() const { return typeid(T); }
+ virtual StoreBase *clone() const { return new Store<T>(data); }
+ virtual bool type_equals(const StoreBase &s) const { return dynamic_cast<const Store<T> *>(&s); }
+ virtual bool value_equals(const StoreBase &s) const { return value_equals_<T>(s); }
+
+ template<typename U>
+ typename std::enable_if<IsEqualityComparable<U>::value, bool>::type value_equals_(const StoreBase &s) const
+ { const Store<T> *t = dynamic_cast<const Store<T> *>(&s); return (t && t->data==data); }
+
+ template<typename U>
+ typename std::enable_if<!IsEqualityComparable<U>::value, bool>::type value_equals_(const StoreBase &) const
+ { return false; }