C++ Logo


Advanced search

Re: std::algorithm over Iterable types

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 6 Jul 2020 21:45:34 +0300
On Mon, 6 Jul 2020 at 21:34, Ryan Kelly via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> Howdy all! I'm wishing to float a proposal idea.
> My idea is to allow the std::algorithm library to work over Iterable types (aka the std:: containers and beyond). It might be more reasonable to start with a subset of the algorithms library. Two basic examples to now demonstrate are std::reverse and std::max_element.

Already done, in std::ranges, in the friendly neighborhood C++20
coming to your nearest vending machine fairly soon.
See for example
where the last overload of reverse takes a bidirectional_range.

Received on 2020-07-06 13:49:00