Skip to content

Replace usage of std::result_of with std::invoke_result #8037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/util/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,9 @@ struct ranget final
/// a value through `f`. `f` may take a move-only typed parameter by const
/// reference. 'f' may also construct and return a move-only typed value.
template <typename functiont>
auto map(functiont &&f) -> ranget<map_iteratort<
iteratort,
typename std::result_of<functiont(value_type)>::type>>
auto map(functiont &&f)
{
using outputt = typename std::result_of<functiont(value_type)>::type;
using outputt = typename std::invoke_result<functiont, value_type>::type;
auto shared_f = std::make_shared<
std::function<outputt(const typename iteratort::value_type &)>>(
std::forward<functiont>(f));
Expand Down