Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-03-21 16:50:33

Thorsten Ottosen wrote:
> |I think Thorsten is referring in part to some off list emails, and in
> |part to when I wrote (about removing the includes for all the standard
> |containers):
> |
> |> Another possible solution is to just use Boost.Range on anything that
> 'looks' like a container. But this will break on unordered containers (as
> equivalent containers can have different |sequences).
> |
> |I forgot to mention that there's no way to tell what 'looks' like a
> |container at all. Joaquín replied:
> |
> |> Too broad IMHO.
> |
> |So, I think we all rejected the idea. It would be nice if there was a
> |way to do something like that, but there isn't.
> that Joachin don't like the idea is ok, it's just not an arguemnt in favor of
> much.

I was just recapping what conversation there was. But it does make three
people opposed to the idea.

> What are the obstacles? The unordered containers can define their
> own version.

But there could be other containers which also cause problems which we
can't anticipate. Or other types which have a sequence, but don't define
equality in terms of that sequence.

> Btw, would you please describe why the unordered containers would "break"?

It's possible for two unordered containers to contain exactly the same
elements but in a different order. So they would get different hash
values for hash_range, but are considered equal (although equality isn't
usually defined anyway).


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