Skip to content

Commit 74075ec

Browse files
Merge pull request #8037 from thomasspriggs/tas/result_of_deprecated
Replace usage of `std::result_of` with `std::invoke_result`
2 parents 7641c46 + bd69bdb commit 74075ec

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/util/range.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,9 @@ struct ranget final
418418
/// a value through `f`. `f` may take a move-only typed parameter by const
419419
/// reference. 'f' may also construct and return a move-only typed value.
420420
template <typename functiont>
421-
auto map(functiont &&f) -> ranget<map_iteratort<
422-
iteratort,
423-
typename std::result_of<functiont(value_type)>::type>>
421+
auto map(functiont &&f)
424422
{
425-
using outputt = typename std::result_of<functiont(value_type)>::type;
423+
using outputt = typename std::invoke_result<functiont, value_type>::type;
426424
auto shared_f = std::make_shared<
427425
std::function<outputt(const typename iteratort::value_type &)>>(
428426
std::forward<functiont>(f));

0 commit comments

Comments
 (0)