C++ Logo

std-proposals

Advanced search

[std-proposals] Allow specialize std::ranges algorithms

From: Nikl Kelbon <kelbonage_at_[hidden]>
Date: Thu, 28 Jul 2022 11:48:31 +0500
Idea: allow std::ranges::* algorithms to be specialized for their own
ranges? Typical examples are upper/lower_bound for map and set, for_each
for map and set is very inefficient as observes an order that is not
guaranteed for_each, there is a .sort for sheets, which could be
specializations of the std::ranges::sort algorithm, and another example is
a circular buffer, if you do for_each through iterators, then there will be
branching at each iteration , but if the order is not important, then the
buffer can simply be read from beginning to end as efficiently as possible

Received on 2022-07-28 06:48:41