Skip to content

Commit 23e4190

Browse files
authored
Merge pull request #28 from kevin--/support-cpp20
std::result_of is removed in C++20 in favor of std::invoke_result
2 parents 5558a42 + 2c911e9 commit 23e4190

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/nod/nod.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ namespace nod {
269269
{
270270
public:
271271
/// Result type when calling the accumulating function operator.
272+
#if (__cplusplus > 201703L)
273+
using result_type = typename std::invoke_result<F, T, typename S::slot_type::result_type>::type;
274+
#else
272275
using result_type = typename std::result_of<F(T, typename S::slot_type::result_type)>::type;
276+
#endif
273277

274278
/// Construct a signal_accumulator as a proxy to a given signal
275279
//

0 commit comments

Comments
 (0)