Skip to content

Commit

Permalink
Use std::invoke_result
Browse files Browse the repository at this point in the history
  • Loading branch information
dancazarin committed Nov 22, 2022
1 parent c49560f commit bb4f29f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/kfr/cometa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ constexpr size_t max_size_t = size_t(-1);
template <typename... T>
using common_type = typename std::common_type<T...>::type;

#if __cplusplus >= 201703L
template <typename T, typename... Args>
using invoke_result = typename std::invoke_result<T, Args...>::type;
#else
template <typename T, typename... Args>
using invoke_result = typename std::result_of<T(Args...)>::type;
#endif

template <bool Condition, typename Type = void>
using enable_if = typename std::enable_if<Condition, Type>::type;
Expand Down

0 comments on commit bb4f29f

Please sign in to comment.