net/AllocatedSocketAddress: allow copying
This commit is contained in:
parent
e7bebb0089
commit
0195d5590f
|
@ -59,7 +59,8 @@ public:
|
|||
*this = src;
|
||||
}
|
||||
|
||||
AllocatedSocketAddress(const AllocatedSocketAddress &) = delete;
|
||||
AllocatedSocketAddress(const AllocatedSocketAddress &src) noexcept
|
||||
:AllocatedSocketAddress((SocketAddress)src) {}
|
||||
|
||||
AllocatedSocketAddress(AllocatedSocketAddress &&src) noexcept
|
||||
:address(src.address), size(src.size) {
|
||||
|
@ -73,7 +74,9 @@ public:
|
|||
|
||||
AllocatedSocketAddress &operator=(SocketAddress src) noexcept;
|
||||
|
||||
AllocatedSocketAddress &operator=(const AllocatedSocketAddress &) = delete;
|
||||
AllocatedSocketAddress &operator=(const AllocatedSocketAddress &src) noexcept {
|
||||
return *this = (SocketAddress)src;
|
||||
}
|
||||
|
||||
AllocatedSocketAddress &operator=(AllocatedSocketAddress &&src) noexcept {
|
||||
std::swap(address, src.address);
|
||||
|
|
Loading…
Reference in New Issue