forked from Kistler-Group/sdbus-cpp
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<T> when constructing from a shared_ptr<T>. 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
This commit is contained in:
committed by
Stanislav Angelovič
parent
ae8849e545
commit
0d010440c5
@ -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>(AsyncCalls::CallData{*this, std::move(asyncReplyCallback), {}});
|
||||
auto weakData = std::weak_ptr{callData};
|
||||
auto weakData = std::weak_ptr<AsyncCalls::CallData>{callData};
|
||||
|
||||
callData->slot = message.send(callback, callData.get(), timeout);
|
||||
|
||||
|
Reference in New Issue
Block a user