[hash.requirements] (original) (raw)

🔗

h(k)

size_t

The value returned shall depend only on the argument k for the duration of the program.

[Note 1:

Thus all evaluations of the expression h(k) with the same value for k yield the same result for a given execution of the program.

— _end note_]

For two different values t1 and t2, the probability that h(t1) and h(t2) compare equal should be very small, approaching 1.0 / numeric_limits<size_t>​::​max().