
Dave Harris wrote:
In-Reply-To: <d1on4o$ijr$1@sea.gmane.org> daniel@calamity.org.uk (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