BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::hash< TYPE > Struct Template Reference

#include <bslstl_hash.h>

Inheritance diagram for bsl::hash< TYPE >:

Public Member Functions

std::size_t operator() (const TYPE &value) const
 

Detailed Description

template<class TYPE>
struct bsl::hash< TYPE >

Empty base class for hashing. This class, and all explicit and partial specializations of this class, shall conform to the C++11 Hash Requirements (C++11 17.6.3.4, [hash.requirements]). Unless this template is explicitly specialized, it will use the default hash algorithm provided by bslh::Hash<> to supply hash values. In order to hash a user-defined type using bsl::hash, bsl::hash must be explicitly specialized for the type, or, preferably, hashAppend must be implemented for the type. For more details on hashAppend and bslh::Hash see the component bslh_hash .

Member Function Documentation

◆ operator()()

template<class TYPE >
std::size_t bsl::hash< TYPE >::operator() ( const TYPE &  value) const
inline

Compute and return the hash of the specified value. This implementation forwards to the call operator of the base class, but with the parameter guaranteed to be of type TYPE.


The documentation for this struct was generated from the following file: