Skip to content

Commit

Permalink
Change result_of to invoke_result in fatal/container/legacy_varia…
Browse files Browse the repository at this point in the history
…nt.h

Summary: C++20 has [eliminated](https://en.cppreference.com/w/cpp/types/result_of) `result_of` in favour of `invoke_result`. It's mysterious that this code even still works, but, nevertheless, I'm fixing it.

Differential Revision: D56987396

fbshipit-source-id: 71ca954c5825fb8f0e1939e51c77fe700b1dff20
  • Loading branch information
r-barnes authored and facebook-github-bot committed May 6, 2024
1 parent 2602114 commit 31d2aa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fatal/container/legacy_variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ struct legacy_variant {
template <typename UCallable, typename... UArgs, typename std::enable_if<
is_supported<
typename std::decay<
typename std::result_of<UCallable&(UArgs...)>::type
typename std::invoke_result<UCallable&, UArgs...>::type
>::type
>(), int
>::type = 0>
Expand All @@ -1295,7 +1295,7 @@ struct legacy_variant {
template <typename UCallable, typename... UArgs, typename std::enable_if<
!is_supported<
typename std::decay<
typename std::result_of<UCallable&(UArgs...)>::type
typename std::invoke_result<UCallable&, UArgs...>::type
>::type
>(), int
>::type = 0>
Expand Down

0 comments on commit 31d2aa4

Please sign in to comment.