+ bool inBinarySubnet(const std::array<uint8_t, 2> addr, size_t numBits) const;
+
+ private:
+ auto tie() const {
+ return std::tie(addr_.bytes_, scope_);
+ }
+
+ public:
+ friend inline bool operator==(const IPAddressV6& a, const IPAddressV6& b) {
+ return a.tie() == b.tie();
+ }
+ friend inline bool operator!=(const IPAddressV6& a, const IPAddressV6& b) {
+ return a.tie() != b.tie();
+ }
+ friend inline bool operator<(const IPAddressV6& a, const IPAddressV6& b) {
+ return a.tie() < b.tie();
+ }
+ friend inline bool operator>(const IPAddressV6& a, const IPAddressV6& b) {
+ return a.tie() > b.tie();
+ }
+ friend inline bool operator<=(const IPAddressV6& a, const IPAddressV6& b) {
+ return a.tie() <= b.tie();
+ }
+ friend inline bool operator>=(const IPAddressV6& a, const IPAddressV6& b) {
+ return a.tie() >= b.tie();
+ }