diff options
Diffstat (limited to 'src/net/AllocatedSocketAddress.hxx')
-rw-r--r-- | src/net/AllocatedSocketAddress.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/AllocatedSocketAddress.hxx b/src/net/AllocatedSocketAddress.hxx index 39bdeddac..def181a8c 100644 --- a/src/net/AllocatedSocketAddress.hxx +++ b/src/net/AllocatedSocketAddress.hxx @@ -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); |