Skip to content

Commit

Permalink
Merge pull request #3157 from MirServer/fix-prerelease-clang-build
Browse files Browse the repository at this point in the history
mir::GLibMainLoop: Fix deprecated `std::result_of_t` usage.
  • Loading branch information
Saviq authored Dec 4, 2023
2 parents 04ed7d3 + 8448922 commit 395f56d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/include/server/mir/glib_main_loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ class GLibMainLoop : public MainLoop
template<
typename Callable,
typename =
std::enable_if_t<!std::is_same<std::result_of_t<Callable()>, void>::value>
std::enable_if_t<!std::is_same<std::invoke_result_t<Callable>, void>::value>
>
std::future<std::result_of_t<Callable()>> run_with_context_as_thread_default(Callable code)
std::future<std::invoke_result_t<Callable>> run_with_context_as_thread_default(Callable code)
{
using Result = std::result_of_t<Callable()>;
using Result = std::invoke_result_t<Callable>;

auto promise = std::make_shared<std::promise<Result>>();
auto future = promise->get_future();
Expand All @@ -131,7 +131,7 @@ class GLibMainLoop : public MainLoop
template<
typename Callable,
typename =
std::enable_if_t<std::is_same<std::result_of_t<Callable()>, void>::value>
std::enable_if_t<std::is_same<std::invoke_result_t<Callable>, void>::value>
>
std::future<void> run_with_context_as_thread_default(Callable code)
{
Expand Down

0 comments on commit 395f56d

Please sign in to comment.