Namespaces
Variants
Views
Actions

C++ concepts: Hash

From cppreference.com
< cpp‎ | concept
Revision as of 18:35, 31 May 2013 by P12bot (Talk | contribs)

 
 
 

A Hash is a function object for which the output depends only on the input and has a very low probability of yielding the same output given different input values.

It must satisfy the requirements of CopyConstructible and Destructible.

Even if passed a lvalue, the Hash object must not modify the input.

Several calls with the same input shall return the same output.

The probability of h(a)==h(b) for a!=b should approach 1.0/std::numeric_limits<size_t>::max().


Hash::operator()


std::size_t operator() ( const Key& k )



Standard library

std::hash