Skip to content

Commit

Permalink
Avoid use of invoke_result in tag_invoke.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Mar 13, 2024
1 parent b963fe0 commit a2a7628
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libs/pika/tag_invoke/include/pika/functional/tag_invoke.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ namespace pika::functional::detail {
#else

# include <pika/config.hpp>
# include <pika/type_support/type_identity.hpp>

# include <type_traits>
# include <utility>
Expand Down Expand Up @@ -185,10 +186,11 @@ namespace pika::functional::detail {
is_nothrow_tag_invocable<Tag, Args...>::value;

template <typename Tag, typename... Args>
using tag_invoke_result = std::invoke_result<decltype(tag_invoke_ns::tag_invoke), Tag, Args...>;
using tag_invoke_result_t =
decltype(tag_invoke_ns::tag_invoke(std::declval<Tag>(), std::declval<Args>()...));

template <typename Tag, typename... Args>
using tag_invoke_result_t = typename tag_invoke_result<Tag, Args...>::type;
using tag_invoke_result = pika::detail::type_identity<tag_invoke_result_t<Tag, Args...>>;

///////////////////////////////////////////////////////////////////////////////
namespace tag_base_ns {
Expand Down

0 comments on commit a2a7628

Please sign in to comment.