C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] std::algorithm over Iterable types
From: Ville Voutilainen (ville.voutilainen_at_[hidden])
Date: 2020-07-06 13:45:34


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
http://eel.is/c++draft/alg.reverse
where the last overload of reverse takes a bidirectional_range.


STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups