Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-04-10 14:18:10


Peter Dimov wrote:

> Or perhaps just switching to:
>
> template<class T> size_t hash_value( T * const & p );
>
> ?

How embarrassing....I hadn't thought of that. I was trying every way I
could think of to declare the array function. I might not be able to get
it to work for older compilers though. But that's not such a big deal.
I'll see how it goes.

I still think it may be a good idea to change hash_combine's
specification (but not necessarily it's implementation) to be in terms
of boost::hash (or std::hash). But that's up to you.

Thorsten wrote:

> Does
>
> template< class T >
> void hash( size_t&, const T* );
>
> template< class T, unsigned N >
> void hash( size_t&, const T (&array)[N] );
>
> not work?

It depends on which compiler you ask, intel linux (EDG based) says no.
(Sorry, for not replying to your mail directly, but I seem to have lost
it, which is a bit odd since I'm using gmane).

Daniel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk