Boost logo

Boost :

Subject: Re: [boost] [flat_set] When to sort?
From: Tim Keitt (tkeitt_at_[hidden])
Date: 2017-03-27 21:29:32


On Mon, Mar 27, 2017 at 4:08 PM, Oswin Krause via Boost <
boost_at_[hidden]> wrote:

> Could you elaborate? From my point of view the semantics and runtime
> characteristics are exactly what I would expect from a flattened binary
> tree(okay, personally i could do with a different, more cache friendly
> ordering of elements, but my use cases are special). I would find any other
> behaviour surprising.

Sorry to jump into the thread, but I was just looking at flat_[set|map]
yesterday, so it is on my mind. Is it not a better solution to create an
algorithm library that operates on sorted ranges (ordered_insert,
binary_search, etc)? That seems to alleviate all concerns because managing
the container is left to the user. (That is the approach I am taking, but
for a more specialized case.)

THK

http://www.keittlab.org/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk