Skip to content

Commit c60ca05

Browse files
committed
Fix result_of for C++20+
1 parent a362fe9 commit c60ca05

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/boolinq/boolinq.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616

1717
//
1818

19+
// The result_of was deprecated since C++20, so redefine it using invoke_result
20+
#if (defined(_MSC_VER) && _MSVC_LANG >= 202002L) || __cplusplus >= 202002L
21+
namespace std
22+
{
23+
template<typename _Callable, typename ..._Args>
24+
using result_of = std::invoke_result<_Callable, _Args...>;
25+
}
26+
#endif
27+
28+
//
29+
1930
namespace boolinq {
2031

2132
struct LinqEndException {};

0 commit comments

Comments
 (0)