From 0d010440c551d5ad2222c8cfb8c7d9cf70e6876a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Tue, 16 Jun 2020 00:02:25 +0200 Subject: [PATCH] Fix build with clang 9.0.1 and libcxx This should not be required in C++17 because there is an appropriate class template deduction rule [1] which infers that it's going to be a weak_ptr when constructing from a shared_ptr. However, in clang/LLVM's libcxx C++ STL implementation this only got implemented in May 2020 [2]. [1] https://en.cppreference.com/w/cpp/memory/weak_ptr/deduction_guides [2] https://reviews.llvm.org/D69603 --- src/Proxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Proxy.cpp b/src/Proxy.cpp index 839227c..644a972 100644 --- a/src/Proxy.cpp +++ b/src/Proxy.cpp @@ -99,7 +99,7 @@ PendingAsyncCall Proxy::callMethod(const MethodCall& message, async_reply_handle auto callback = (void*)&Proxy::sdbus_async_reply_handler; auto callData = std::make_shared(AsyncCalls::CallData{*this, std::move(asyncReplyCallback), {}}); - auto weakData = std::weak_ptr{callData}; + auto weakData = std::weak_ptr{callData}; callData->slot = message.send(callback, callData.get(), timeout);