From 35cfa6efa3ec674a230784f2e105a9aa59e27fc2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Aug 2023 10:28:17 +0200 Subject: [PATCH] net/StaticSocketAddress: add SocketAddress cast constructor --- src/net/StaticSocketAddress.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net/StaticSocketAddress.hxx b/src/net/StaticSocketAddress.hxx index 5c4c6219b..3557f5eb6 100644 --- a/src/net/StaticSocketAddress.hxx +++ b/src/net/StaticSocketAddress.hxx @@ -26,6 +26,10 @@ private: public: StaticSocketAddress() = default; + explicit StaticSocketAddress(SocketAddress src) noexcept { + *this = src; + } + StaticSocketAddress &operator=(SocketAddress other) noexcept; constexpr operator SocketAddress() const noexcept {