Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2005-02-06 14:17:36

Hi Daniel,

----- Mensaje original -----
De: Daniel James <daniel_at_[hidden]>
Fecha: Domingo, Febrero 6, 2005 7:12 pm
Asunto: [boost] Re: [boost.tr1?] request for a hash<> implementation

> > What I'm interested in in the short term is the hash<> functor
> > alone. Of course unordered containers are much more interesting,
> > but this will have to undergo the usual review process, I guess.
> > Do you think we can put your hash<> implementation under
> > boost/functional/hash.hpp and have some short docs for it?
> I've just uploaded a new version. I've rewritten the hash
> functions
> based on Peter's design. I'll write some documentation and some
> more
> tests soon.

You've been fast! I've taken a look at your stuff and have
a couple of concerns/suggestions:

1. Now the file is boost/hash/functional.hpp. Wouldn't it
be better to call it boost/functional/hash.hpp? As I see it, hash<>
is part of TR1 future <functional>, so the naming
I propose looks more consistent.
2. The header includes <set> and <map>, which can be quite heavy
if the user has no intention to use the corresponding hash_value
overloads. Alas, I don't know of any way to avoid the inclusions,
since a forward declaration of these containers can fail due
to the freedom stdlib implementers have to add additional template
parameters to those specified by the standard. Any idea?

I'll soon bundle your header with a preview of hashed indices for
Boost.MultiIndex, probably the next week. Thank you so
much for your effort,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

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