Subject: Re: [std-proposals] std::tree
From: Marcel F. KrÃ¼ger (zauguin_at_[hidden])
Date: 2021-02-06 08:10:37
Am Sa., 6. Feb. 2021 um 13:28 Uhr schrieb Magnus Fromreide via
> On Fri, Feb 05, 2021 at 01:17:12PM -0500, Jason McKesson via Std-Proposals wrote:
> > On Fri, Feb 5, 2021 at 1:09 PM Magnus Fromreide via Std-Proposals
> > <std-proposals_at_[hidden]> wrote:
> > >
> > You should instead focus on explaining why you want a tree that isn't
> > a set/map. Your post here just sort of assumes that this is a thing
> > that is desired. I mean, you say that it "gives a lot more flexibility
> > in the choice of the key_type", but you don't explain what you're
> > supposed to do with that flexibility. That is, when do you need it?
> > What problems can be better solved with the feature than without it?
> The problem I am trying to solve is when I have a number of data structures
> which I wish to look up with the timing characteristics of a set the key
> ain't the whole data structure and I want to be able to change the non-key
> parts of the value_type.
It sounds like you could get that with the existing std::set by
wrapping your data in a struct as a mutable member and defining the
compare object to only compare the key part.
STD-PROPOSALS list run by firstname.lastname@example.org
Standard Proposals Archives on Google Groups