AK: Add LogStream operator<< for IPv4Address.

This commit is contained in:
Andreas Kling 2019-07-08 11:43:42 +02:00
parent b6dcb5e7ae
commit d8f1a7e046
Notes: sideshowbarker 2024-07-19 13:22:23 +09:00

View file

@ -1,6 +1,7 @@
#pragma once
#include <AK/AKString.h>
#include <AK/LogStream.h>
#include <AK/NetworkOrdered.h>
#include <AK/Optional.h>
@ -85,6 +86,11 @@ struct Traits<IPv4Address> : public GenericTraits<IPv4Address> {
static void dump(const IPv4Address& address) { kprintf("%s", address.to_string().characters()); }
};
inline const LogStream& operator<<(const LogStream& stream, const IPv4Address& value)
{
return stream << value.to_string();
}
}
using AK::IPv4Address;