Showing content from https://timsong-cpp.github.io/cppwp/n4659/hash.requirements below:
[hash.requirements]
20 Library introduction [library] 20.5 Library-wide requirements [requirements] 20.5.3 Requirements on types and expressions [utility.requirements] 20.5.3.4 Hash requirements [hash.requirements]
Given Key is an argument type for function objects of type H, in Table 29 h is a value of type (possibly const) H, u is an lvalue of type Key, and k is a value of a type convertible to (possibly const) Key.
Table
29
—
Hash
requirements
Expression Return type Requirement h(k) size_t The value returned shall depend only on the argument k for the duration of the program. [ Note: 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 ] [ 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(). — end note ] h(u) size_t Shall not modify u.
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4