
13 Mar
2005
13 Mar
'05
4:49 p.m.
Daniel James wrote:
Dave Harris wrote:
For example, the proposal has no specialisation for chars at all. I can't tell if that is an oversight, or whether it is a design aim that: char chars[] = { 1, 2, 3, 4 }; int ints[] = { 1, 2, 3, 4 };
assert( hash_range( chars, chars+4 ) == hash_range( ints, ints+4 ) );
I don't think it's either. Peter?
Sequences of the same values produce the same hash value by design. In a language where character values are different from integer values this would not imply char[] and int[] compatibility, of course, but a C++ "char" is not necessarily a character, and "unsigned int" is not necessarily a non-character.