From afe2ef6e393e2c85295e3820bc47b72ff7680bad Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 1 Apr 2015 20:57:37 +0300 Subject: [PATCH] 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. --- types.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types.hh b/types.hh index df8b06ddeb..7a33d06ede 100644 --- a/types.hh +++ b/types.hh @@ -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& 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().