Boost logo

Boost Users :

Subject: Re: [Boost-users] [Unordered] [Multi-Index] Set lookup from something else than key_type
From: Daniel James (daniel_james_at_[hidden])
Date: 2009-09-02 04:09:31


2009/9/1 Joaquin M Lopez Munoz <joaquin_at_[hidden]>:
> Dominique Devienne <ddevienne <at> gmail.com> writes:
>> Any reason why unordered cannot allow similar "compatible key" lookups?
>
> There is no technical reason why Boost.Unordered couldn't
> provide the compatible key functionality. It just happens not
> to be a feature condidered in the standard, but if you
> convince the author to add it as an extension implementing it
> should be trivial.

AFAICT if the hash function doesn't support the type that you supply
it will implicitly construct a key for every call to the hash function
and equality predicate. Which is a problem.

Daniel


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net