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().