A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/vector/vector-bool/hash/ below:

class template specialization

<vector>

std::hash<vector<bool>>
template <class T> struct hash;                             // unspecializedtemplate <class Alloc> struct hash <vector<bool,Alloc>>;    // vector<bool>

Hash for vector<bool>

Unary function object class that defines the hash specialization for vector<bool>.

The functional call returns a hash value based on the entire vector: A hash value is a value that depends solely on its argument, returning always the same value for the same argument (for a given program execution). The value returned shall have a small likelihood of being the same as the one returned for a different argument (with chances of collision approaching 1/numeric_limits<size_t>::max).

This allows the use of vector<bool> objects as keys for unordered containers (like unordered_set or unordered_map).

See hash for additional information.



Member functions
operator()
Returns a hash value for its argument, as a value of type size_t.
size_t is an unsigned integral type.

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