We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7641c46 + bd69bdb commit 74075ecCopy full SHA for 74075ec
src/util/range.h
@@ -418,11 +418,9 @@ struct ranget final
418
/// a value through `f`. `f` may take a move-only typed parameter by const
419
/// reference. 'f' may also construct and return a move-only typed value.
420
template <typename functiont>
421
- auto map(functiont &&f) -> ranget<map_iteratort<
422
- iteratort,
423
- typename std::result_of<functiont(value_type)>::type>>
+ auto map(functiont &&f)
424
{
425
- using outputt = typename std::result_of<functiont(value_type)>::type;
+ using outputt = typename std::invoke_result<functiont, value_type>::type;
426
auto shared_f = std::make_shared<
427
std::function<outputt(const typename iteratort::value_type &)>>(
428
std::forward<functiont>(f));
0 commit comments