C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Add more methods to std::initializer_list instead of overloading

From: blacktea hamburger <greenteahamburger_at_[hidden]>
Date: Sun, 4 Sep 2022 17:22:04 +0800
Sorry, I ignored maps.

As I said earlier, not everyone uses ranges::*.

On Sat, Sep 3, 2022 at 11:03 PM Jason McKesson via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Sat, Sep 3, 2022 at 9:26 AM blacktea hamburger via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > How do you explain associative/unordered associative containers? Both
> their iterator/const_iterator member types are constant iterators, but they
> still provide cbegin/cend methods.
>
> For the various `set`s, they are constant iterators. But this is not
> true for `map`s: the key of the pair is const, but not the value.
>
> > And how do you explain rbegin/rend/empty, etc?
>
> What about them? The whole point of `ranges::rbegin/rend` is that
> people who write some range type don't have to provide those members
> at all if the defaults of `ranges::rbeing/rend` work. And they do work
> for `initializer_list`.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2022-09-04 09:22:30