Replace usage of std::result_of with std::invoke_result
std::result_of is deprecated in C++17, and removed in C++20. Microsoft has gone ahead with the removal as of Visual Studio 16.6.0, so before this change our code is broken there.
This commit is contained in:
parent
4fc8674a7a
commit
209308a4d6
|
@ -26,7 +26,7 @@ class QObject;
|
||||||
template <typename F>
|
template <typename F>
|
||||||
auto RunOnObject(QObject* object, F&& functor)
|
auto RunOnObject(QObject* object, F&& functor)
|
||||||
{
|
{
|
||||||
using OptionalResultT = std::optional<std::result_of_t<F()>>;
|
using OptionalResultT = std::optional<std::invoke_result_t<F>>;
|
||||||
|
|
||||||
// If we queue up a functor on the current thread, it won't run until we return to the event loop,
|
// If we queue up a functor on the current thread, it won't run until we return to the event loop,
|
||||||
// which means waiting for it to finish will never complete. Instead, run it immediately.
|
// which means waiting for it to finish will never complete. Instead, run it immediately.
|
||||||
|
|
Loading…
Reference in New Issue