From 7b310802583a96dd32841bc396a119fca833e2d4 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 6 Apr 2023 17:46:58 +0200 Subject: Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=> --- src/server/shared/Networking/AsyncAcceptor.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/shared') diff --git a/src/server/shared/Networking/AsyncAcceptor.h b/src/server/shared/Networking/AsyncAcceptor.h index e88330ebdba..782fa26f879 100644 --- a/src/server/shared/Networking/AsyncAcceptor.h +++ b/src/server/shared/Networking/AsyncAcceptor.h @@ -46,9 +46,10 @@ public: template void AsyncAcceptWithCallback() { - tcp::socket* socket; - uint32 threadIndex; - std::tie(socket, threadIndex) = _socketFactory(); + auto [tmpSocket, tmpThreadIndex] = _socketFactory(); + // TODO: get rid of temporary variables (clang 15 cannot handle variables from structured bindings as lambda captures) + tcp::socket* socket = tmpSocket; + uint32 threadIndex = tmpThreadIndex; _acceptor.async_accept(*socket, [this, socket, threadIndex](boost::system::error_code error) { if (!error) -- cgit v1.2.3