Commit cfc6388f authored by Dominik Charousset's avatar Dominik Charousset

Remove IPv6 comparison, add setter for bits

parent 1be020b4
......@@ -28,8 +28,7 @@
namespace caf {
class ipv4_address : public byte_address<ipv4_address>,
detail::comparable<ipv4_address, ipv6_address> {
class ipv4_address : public byte_address<ipv4_address> {
public:
// -- constants --------------------------------------------------------------
......@@ -47,14 +46,6 @@ public:
ipv4_address(array_type bytes);
// -- comparison -------------------------------------------------------------
using super::compare;
/// Returns a negative number if `*this < other`, zero if `*this == other`
/// and a positive number if `*this > other`.
int compare(const ipv6_address& other) const noexcept;
// -- properties -------------------------------------------------------------
/// Returns whether this is a loopback address.
......@@ -68,6 +59,12 @@ public:
return bits_;
}
/// Sets all bits of the IP address in a single 32-bit write.
/// @private
inline void bits(uint32_t value) noexcept {
bits_ = value;
}
/// Returns the bytes of the IP address as array.
inline array_type& bytes() noexcept {
return bytes_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment