C++ Logo

std-proposals

Advanced search

Re: std::algorithm over Iterable types

From: Ryan Kelly <ryantk98_at_[hidden]>
Date: Mon, 6 Jul 2020 13:56:35 -0500
That's terrific!! I apologize for failing to know this already!!

On Mon, Jul 6, 2020 at 1:45 PM Ville Voutilainen <
ville.voutilainen_at_[hidden]> wrote:

> 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.
>

Received on 2020-07-06 14:00:01