C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Any interest in having Fenwick trees in the standard?

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Thu, 15 Oct 2026 20:07:26 +0300
On Thu, 15 Oct 2026 at 20:04, Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]> wrote:
>
> On Thu, Oct 15, 2026 at 12:56 PM Ville Voutilainen via Std-Proposals <std-proposals_at_[hidden]> wrote:
>>
>> On Thu, 15 Oct 2026 at 19:19, Brian Bi via Std-Proposals
>> <std-proposals_at_[hidden]> wrote:
>> >
>> > I don't think segment trees are a good candidate for standardization. There are multiple different implementation strategies and the choice of implementation strategy affects performance in a meaningful way.
>>
>> Which part of that is not solvable by specifying complexity guarantees?
>
>
> Ville, IIUC you're saying "LWG can force the STL to provide a particular implementation by careful wording" (like we did for `unordered_map`).
> But Brian, IIUC, is saying "Different kinds of users need multiple different particular implementations, and the STL can't reasonably provide all of them."
>
> (I agree with Brian's point, as I understand it to be. However, I also admit that that point didn't stop WG21 from standardizing unordered_map, or regex, or hive, or linalg, or...)

I don't know what Brian is trying to say. That's why I'm asking questions.

Received on 2026-10-15 17:07:47