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

Method operator |

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

Source from the content-addressed store, hash-verified

410
411
412IPAddress IPAddress::operator | (const IPAddress& other) const
413{
414 if (family() == other.family())
415 {
416 if (family() == IPv4)
417 {
418 IPv4AddressImpl t(pImpl()->addr());
419 IPv4AddressImpl o(other.pImpl()->addr());
420 return IPAddress((t | o).addr(), sizeof(struct in_addr));
421 }
422#if defined(POCO_HAVE_IPv6)
423 else if (family() == IPv6)
424 {
425 const IPv6AddressImpl t(pImpl()->addr(), pImpl()->scope());
426 const IPv6AddressImpl o(other.pImpl()->addr(), other.pImpl()->scope());
427 const IPv6AddressImpl r = t | o;
428 return IPAddress(r.addr(), sizeof(struct in6_addr), r.scope());
429 }
430#endif
431 else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
432 }
433 else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
434}
435
436
437IPAddress IPAddress::operator ^ (const IPAddress& other) 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