This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Improving equal_range and erase(key) in tree containers


On Thu, 05 Oct 2006 11:38:46 +0200, Paolo Carlini <pcarlini@suse.de>
wrote:

>Ion Gaztañaga wrote:
>
>> Hi,
>>
>> While implementing my own tree containers, I've found that nearly
>> every standard library version implements multiset/multimap
>> equal_range with something like this: 
>
>Ion, I think you are raising very good points

Yep. I'd suggest, however, implementing the solution at a different
layer, with a lower_upper_bound<> template (which could return, for
instance, a std::pair of iterators). That would make the solution
reusable in several places.

--
Genny.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]