Boost logo

Boost :

Subject: Re: [boost] [containers] flat_set/flat_map could add insert_sorted(begin, end)
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-04-21 07:10:25


On 21/04/2010 12:57, Thorsten Ottosen wrote:
> That's one appproach. We could also strengthen the precondition
> and require that the input sequence is sorted and unique.

You still need to remove duplicates between the unique sorted input
range and stored values. Unless you require that the input sequence
should not contain any value already stored in the container (this could
be a more optimized function, it has a worst case with just a single
reallocation since the final size is size() + input_range_size).

Best,

Ion


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