db: implement abstract_type::equals()

At present, no overloads are needed because collections are interned, and
all other implemented data types are singletons.  Tuples and user defined
types will need an overload.
This commit is contained in:
Avi Kivity
2015-04-01 20:57:37 +03:00
parent 238ef64d5a
commit afe2ef6e39

View File

@@ -196,7 +196,13 @@ public:
bool is_value_compatible_with(abstract_type& other) {
return is_value_compatible_with_internal(*other.underlying_type());
}
bool equals(const shared_ptr<abstract_type>& other) const {
return equals(*other);
}
protected:
virtual bool equals(const abstract_type& other) const {
return this == &other;
}
/**
* Needed to handle ReversedType in value-compatibility checks. Subclasses should implement this instead of
* is_value_compatible_with().