summaryrefslogtreecommitdiff
path: root/src/net/AllocatedSocketAddress.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-05-17 12:19:24 +0200
committerMax Kellermann <max@musicpd.org>2017-05-17 12:19:24 +0200
commit0195d5590f98325bed98754890063904ec0751e4 (patch)
treea7a8e84bac7aaf9ed2d5ef70cff0bc0735c63531 /src/net/AllocatedSocketAddress.hxx
parente7bebb0089f85fb11b73db259c7b6ace386a815c (diff)
net/AllocatedSocketAddress: allow copying
Diffstat (limited to 'src/net/AllocatedSocketAddress.hxx')
-rw-r--r--src/net/AllocatedSocketAddress.hxx7
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);