|
Boost : |
From: Daniel James (daniel_at_[hidden])
Date: 2005-03-22 13:25:37
Dave Harris wrote:
> In-Reply-To: <d1on4o$ijr$1_at_[hidden]>
> daniel_at_[hidden] (Daniel James) wrote (abridged):
>
>>>Admittedly hash_combine is also (nearly) redundant, being definable
>>>as:
>>>
>>> void hash_combine( size_t &hash, const T &t ) {
>>> hash_range( hash, &t, &t+1 );
>>> }
>>>
>>>if T does not overload address-of.
>
>
> Note this is currently true because hash_range is defined as having the
> effect of:
>
> void hash_range( size_t &hash, It first, It last ) {
> for (; first != last; ++first)
> hash_combine( hash, *first );
> }
>
> so calling hash_range on a range of 1 element returns the same result as
> calling hash_combine with that element.
Sorry, I misread what you were saying. I shouldn't have rushed of an
answer before going to work. Everything I wrote still stands, but I
suppose the response to that part was irrelevant.
Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk