MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / operator ^

Method operator ^

base/poco/Net/src/IPAddress.cpp:437–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435
436
437IPAddress IPAddress::operator ^ (const IPAddress& other) const
438{
439 if (family() == other.family())
440 {
441 if (family() == IPv4)
442 {
443 IPv4AddressImpl t(pImpl()->addr());
444 IPv4AddressImpl o(other.pImpl()->addr());
445 return IPAddress((t ^ o).addr(), sizeof(struct in_addr));
446 }
447#if defined(POCO_HAVE_IPv6)
448 else if (family() == IPv6)
449 {
450 const IPv6AddressImpl t(pImpl()->addr(), pImpl()->scope());
451 const IPv6AddressImpl o(other.pImpl()->addr(), other.pImpl()->scope());
452 const IPv6AddressImpl r = t ^ o;
453 return IPAddress(r.addr(), sizeof(struct in6_addr), r.scope());
454 }
455#endif
456 else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
457 }
458 else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
459}
460
461
462IPAddress IPAddress::operator ~ () const

Callers

nothing calls this directly

Calls 5

IPAddressClass · 0.50
familyMethod · 0.45
addrMethod · 0.45
pImplMethod · 0.45
scopeMethod · 0.45

Tested by

no test coverage detected