net/addr/ether: Add missing equal operator
Otherwise, it can be ambiguous which side to downcast
Change-Id: Ie9226912f4b71093f8e1c193b71bfbd58332c5c3
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/include/stdplus/net/addr/ether.hpp b/include/stdplus/net/addr/ether.hpp
index a24a319..ef29889 100644
--- a/include/stdplus/net/addr/ether.hpp
+++ b/include/stdplus/net/addr/ether.hpp
@@ -27,6 +27,11 @@
return std::equal(ether_addr_octet, ether_addr_octet + 6,
rhs.ether_addr_octet);
}
+
+ constexpr bool operator==(EtherAddr rhs) const noexcept
+ {
+ return *this == static_cast<ether_addr&>(rhs);
+ }
};
template <>