Commit 9151b84c authored by Max Kellermann's avatar Max Kellermann

net/AllocatedSocketAddress: convert operator== to template

parent 5d7dd12f
......@@ -84,13 +84,16 @@ public:
return *this;
}
template<typename T>
gcc_pure
bool operator==(SocketAddress other) const noexcept {
return (SocketAddress)*this == other;
bool operator==(T &&other) const noexcept {
return (SocketAddress)*this == std::forward<T>(other);
}
bool operator!=(SocketAddress other) const noexcept {
return !(*this == other);
template<typename T>
gcc_pure
bool operator!=(T &&other) const noexcept {
return !(*this == std::forward<T>(other));
}
gcc_const
......
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