Skip to content

Commit 2c911e9

Browse files
committed
std::result_of is removed in C++20 in favor of std::invoke_result
1 parent 5558a42 commit 2c911e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/nod/nod.hpp

Lines changed: 4 additions & 0 deletions
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)