Skip to content

Commit

Permalink
Drop the usage of std::result_of since it is deprecated, closes #266
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Aug 26, 2022
1 parent ecacadf commit 0257521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/fplus/composition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ auto logical_xor(UnaryPredicateF f, UnaryPredicateG g)
// mapping input values to output values.
template <typename F,
typename FIn = typename utils::function_traits<F>::template arg<0>::type,
typename FOut = typename std::result_of<F(FIn)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn>,
typename MemoMap = std::unordered_map<
typename std::remove_reference<typename std::remove_const<FIn>::type>::type,
FOut>>
Expand All @@ -256,7 +256,7 @@ namespace internal
template <typename F, typename Cache,
typename FIn1 = typename utils::function_traits<F>::template arg<0>::type,
typename FIn2 = typename utils::function_traits<F>::template arg<1>::type,
typename FOut = typename std::result_of<F(FIn1, FIn2)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn1, FIn2>,
typename ResultF = std::function<FOut(FIn2)>>
ResultF memoize_recursive_helper(const F f, std::shared_ptr<Cache> storage)
{
Expand Down Expand Up @@ -287,7 +287,7 @@ namespace internal
template <typename F,
typename FIn1 = typename utils::function_traits<F>::template arg<0>::type,
typename FIn2 = typename utils::function_traits<F>::template arg<1>::type,
typename FOut = typename std::result_of<F(FIn1, FIn2)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn1, FIn2>,
typename MemoMap = std::unordered_map<
typename std::remove_reference<typename std::remove_const<FIn2>::type>::type,
FOut>>
Expand All @@ -305,7 +305,7 @@ std::function<FOut(FIn2)> memoize_recursive(F f)
template <typename F,
typename FIn1 = typename utils::function_traits<F>::template arg<0>::type,
typename FIn2 = typename utils::function_traits<F>::template arg<1>::type,
typename FOut = typename std::result_of<F(FIn1, FIn2)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn1, FIn2>,
typename ParamPair = std::pair<
typename std::remove_reference<typename std::remove_const<FIn1>::type>::type,
typename std::remove_reference<typename std::remove_const<FIn2>::type>::type>,
Expand Down
8 changes: 4 additions & 4 deletions include_all_in_one/include/fplus/fplus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ auto logical_xor(UnaryPredicateF f, UnaryPredicateG g)
// mapping input values to output values.
template <typename F,
typename FIn = typename utils::function_traits<F>::template arg<0>::type,
typename FOut = typename std::result_of<F(FIn)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn>,
typename MemoMap = std::unordered_map<
typename std::remove_reference<typename std::remove_const<FIn>::type>::type,
FOut>>
Expand All @@ -1622,7 +1622,7 @@ namespace internal
template <typename F, typename Cache,
typename FIn1 = typename utils::function_traits<F>::template arg<0>::type,
typename FIn2 = typename utils::function_traits<F>::template arg<1>::type,
typename FOut = typename std::result_of<F(FIn1, FIn2)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn1, FIn2>,
typename ResultF = std::function<FOut(FIn2)>>
ResultF memoize_recursive_helper(const F f, std::shared_ptr<Cache> storage)
{
Expand Down Expand Up @@ -1653,7 +1653,7 @@ namespace internal
template <typename F,
typename FIn1 = typename utils::function_traits<F>::template arg<0>::type,
typename FIn2 = typename utils::function_traits<F>::template arg<1>::type,
typename FOut = typename std::result_of<F(FIn1, FIn2)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn1, FIn2>,
typename MemoMap = std::unordered_map<
typename std::remove_reference<typename std::remove_const<FIn2>::type>::type,
FOut>>
Expand All @@ -1671,7 +1671,7 @@ std::function<FOut(FIn2)> memoize_recursive(F f)
template <typename F,
typename FIn1 = typename utils::function_traits<F>::template arg<0>::type,
typename FIn2 = typename utils::function_traits<F>::template arg<1>::type,
typename FOut = typename std::result_of<F(FIn1, FIn2)>::type,
typename FOut = typename internal::invoke_result_t<F, FIn1, FIn2>,
typename ParamPair = std::pair<
typename std::remove_reference<typename std::remove_const<FIn1>::type>::type,
typename std::remove_reference<typename std::remove_const<FIn2>::type>::type>,
Expand Down

0 comments on commit 0257521

Please sign in to comment.