net/AllocatedSocketAddress: convert operator== to template
This commit is contained in:
parent
5d7dd12f7a
commit
9151b84c25
@ -84,13 +84,16 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
gcc_pure
|
gcc_pure
|
||||||
bool operator==(SocketAddress other) const noexcept {
|
bool operator==(T &&other) const noexcept {
|
||||||
return (SocketAddress)*this == other;
|
return (SocketAddress)*this == std::forward<T>(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(SocketAddress other) const noexcept {
|
template<typename T>
|
||||||
return !(*this == other);
|
gcc_pure
|
||||||
|
bool operator!=(T &&other) const noexcept {
|
||||||
|
return !(*this == std::forward<T>(other));
|
||||||
}
|
}
|
||||||
|
|
||||||
gcc_const
|
gcc_const
|
||||||
|
Loading…
Reference in New Issue
Block a user