|
BDE 4.39.x Production Release
|
#include <bdlb_cstringhash.h>
This struct defines a hash operation for null-terminated character strings enabling them to be used as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set.
See bdlb_cstringhash
Public Types | |
| typedef const char * | argument_type |
| typedef bsl::size_t | result_type |
Public Member Functions | |
| BSLMF_NESTED_TRAIT_DECLARATION (CStringHash, bsl::is_trivially_copyable) | |
| BSLMF_NESTED_TRAIT_DECLARATION (CStringHash, bsl::is_trivially_default_constructible) | |
| CStringHash ()=default | |
| CStringHash (const CStringHash &original)=default | |
| ~CStringHash ()=default | |
| CStringHash & | operator= (const CStringHash &rhs)=default |
| bsl::size_t | operator() (const char *argument) const |
| typedef const char* bdlb::CStringHash::argument_type |
| typedef bsl::size_t bdlb::CStringHash::result_type |
|
default |
Create a CStringHash object.
|
default |
Create a CStringHash object.
CStringHash is an empty (stateless) type, this operation will have no observable effect.
|
default |
Destroy this object.
| bdlb::CStringHash::BSLMF_NESTED_TRAIT_DECLARATION | ( | CStringHash | , |
| bsl::is_trivially_copyable | |||
| ) |
| bdlb::CStringHash::BSLMF_NESTED_TRAIT_DECLARATION | ( | CStringHash | , |
| bsl::is_trivially_default_constructible | |||
| ) |
|
inline |
Return a hash code generated from the contents of the specified null-terminated argument string.
argument points to a null-terminated string.
|
default |
Assign to this object the value of the specified rhs object, and a return a reference providing modifiable access to this object.
CStringHash is an empty (stateless) type, this operation will have no observable effect.