net/addr/ip: Constify isLoopback / isUnicast
Change-Id: Icef8285c73c680d452f58d552dd7c1c338267fe1
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/include/stdplus/net/addr/ip.hpp b/include/stdplus/net/addr/ip.hpp
index d5e5312..50fe64c 100644
--- a/include/stdplus/net/addr/ip.hpp
+++ b/include/stdplus/net/addr/ip.hpp
@@ -243,8 +243,8 @@
return *this == static_cast<in6_addr&>(rhs);
}
- constexpr bool isLoopback() noexcept;
- constexpr bool isUnicast() noexcept;
+ constexpr bool isLoopback() const noexcept;
+ constexpr bool isUnicast() const noexcept;
};
template <>
@@ -554,12 +554,12 @@
} // namespace in_addr_literals
-constexpr bool In6Addr::isLoopback() noexcept
+constexpr bool In6Addr::isLoopback() const noexcept
{
return *this == "::1"_ip6; // ::1/128
}
-constexpr bool In6Addr::isUnicast() noexcept
+constexpr bool In6Addr::isUnicast() const noexcept
{
return *this != "::"_ip6 && // ::/128
byte(0) != 0xff; // ff00::/8