diff --git a/src/core/border_router/router_advertisement.hpp b/src/core/border_router/router_advertisement.hpp index 970af89ea..38ac260f4 100644 --- a/src/core/border_router/router_advertisement.hpp +++ b/src/core/border_router/router_advertisement.hpp @@ -47,6 +47,7 @@ #include #include "common/encoding.hpp" +#include "common/equatable.hpp" #include "net/icmp6.hpp" #include "net/ip6.hpp" @@ -386,7 +387,7 @@ static_assert(sizeof(RouteInfoOption) == 24, "invalid RouteInfoOption structure" * */ OT_TOOL_PACKED_BEGIN -class RouterAdvMessage +class RouterAdvMessage : public Unequatable { public: /** @@ -459,18 +460,6 @@ public: */ bool operator==(const RouterAdvMessage &aOther) const; - /** - * This method overloads operator `!=` to evaluate whether or not - * two instances of `RouterAdvMessage` are equal. - * - * @param[in] aOther The other `RouterAdvMessage` instance to compare with. - * - * @retval TRUE If the two `RouterAdvMessage` instances are not equal. - * @retval FALSE If the two `RouterAdvMessage` instances are equal. - * - */ - bool operator!=(const RouterAdvMessage &aOther) const { return !(*this == aOther); } - private: enum : uint8_t {