Represents an IP version 6 address (128 bits) If it represents an IPv4 address, can be converted to an IPv4 address.
More...
#include <ip.hpp>
Represents an IP version 6 address (128 bits) If it represents an IPv4 address, can be converted to an IPv4 address.
Definition at line 83 of file ip.hpp.
◆ init() [1/4]
◆ init() [2/4]
◆ init() [3/4]
◆ init() [4/4]
◆ is_ip4()
bool mtcore::IPv6::is_ip4 |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 107 of file ip.hpp.
107 {
108 return high == 0 && ((
low & 0xffffffff00000000ull) == 0x0000ffff00000000ull);
109 }
◆ operator!=()
bool mtcore::IPv6::operator!= |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 101 of file ip.hpp.
101{ return (*this <=> o) != 0; }
◆ operator<()
bool mtcore::IPv6::operator< |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 104 of file ip.hpp.
104{ return (*this <=> o) < 0; }
◆ operator<=()
bool mtcore::IPv6::operator<= |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 102 of file ip.hpp.
102{ return (*this <=> o) <= 0; }
◆ operator<=>()
std::strong_ordering mtcore::IPv6::operator<=> |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 92 of file ip.hpp.
92 {
93 const auto highCmp =
high <=> o.high;
94 const auto lowCmp =
low <=> o.low;
95 if (highCmp == std::strong_ordering::equal) {
96 return lowCmp;
97 }
98 return highCmp;
99 }
◆ operator==()
bool mtcore::IPv6::operator== |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 100 of file ip.hpp.
100{ return (*this <=> o) == 0; }
◆ operator>()
bool mtcore::IPv6::operator> |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 105 of file ip.hpp.
105{ return (*this <=> o) > 0; }
◆ operator>=()
bool mtcore::IPv6::operator>= |
( |
const IPv6 & | o | ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 103 of file ip.hpp.
103{ return (*this <=> o) >= 0; }
◆ to_ip4()
◆ high
u64 mtcore::IPv6::high = 0 |
◆ low
u64 mtcore::IPv6::low = 0 |
The documentation for this struct was generated from the following file: