Skip to content

Commit

Permalink
Merge pull request #61 from RoqueDeicide/master
Browse files Browse the repository at this point in the history
Reimplemented result_of in c++ 20
  • Loading branch information
k06a authored Dec 31, 2021
2 parents 72a8fdd + ce74b7c commit 55304b9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions include/boolinq/boolinq.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@
#if (defined(_MSC_VER) && _MSVC_LANG >= 202002L) || __cplusplus >= 202002L
namespace std
{
template<typename _Callable, typename ..._Args>
using result_of = std::invoke_result<_Callable, _Args...>;
template<typename>
struct result_of;

template<typename _Callable, typename ..._Args>
struct result_of<_Callable(_Args...)>
{
using type = std::invoke_result<_Callable, _Args...>::type;
};
}
#endif

Expand Down Expand Up @@ -892,4 +898,4 @@ namespace boolinq {
}
);
}
}
}

0 comments on commit 55304b9

Please sign in to comment.