Boost logo

Boost :

Subject: Re: [boost] Abstract STL Container Adaptors
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-03-14 18:39:13

On Thursday, March 14, 2013, Andy Jost wrote:

> On 14 March 2013 16:31, Neil Groves <neil_at_[hidden]<javascript:;>>
> wrote:
> >Of course, if performance it isn't important, then just use std::set and
> be done with it.
> >Is there any criterion besides performance that people choose between set
> and unordered_set where generalization would make any sense?
> The key question is: who gets to make that decision? ``my_algorithm`` may
> be happy to use std::set, but it's really the caller's choice. Perhaps the
> information ``my_algorithm`` needs already lives somewhere in a
> boost::multi_index_container. Does it really need to be copied just to
> call ``my_algorithm``?

I really cannot follow this.

If the container is type erased, how do you get that information you are
alluding to back out?

> Perhaps I would like to compile ``my_algorithm`` once and stick it in a
> library file. Does it really need to be recompiled for each concrete
> container type?

There are plenty of papers and implementations of any_iterator out there.
Why is that not sufficient for your needs?

 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Boost list run by bdawes at, gregod at, cpdaniel at, john at