BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::CaselessStringViewHash Struct Reference

#include <bdlb_caselessstringviewhash.h>

Public Types

typedef bsl::string_view argument_type
 
typedef bsl::size_t result_type
 
typedef void is_transparent
 Type alias indicating this is a transparent hash functor.
 

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (CaselessStringViewHash, bsl::is_trivially_copyable)
 
 BSLMF_NESTED_TRAIT_DECLARATION (CaselessStringViewHash, bsl::is_trivially_default_constructible)
 
 CaselessStringViewHash ()=default
 Create a CaselessStringViewHash object.
 
 CaselessStringViewHash (const CaselessStringViewHash &original)=default
 
 ~CaselessStringViewHash ()=default
 Destroy this object.
 
CaselessStringViewHashoperator= (const CaselessStringViewHash &rhs)=default
 
bsl::size_t operator() (bsl::string_view argument) const
 

Detailed Description

This struct defines a hash operation for string views enabling bsl::strings or bsl::string_views to be used as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set. Note that this class is an empty POD type.

Member Typedef Documentation

◆ argument_type

◆ is_transparent

◆ result_type

Constructor & Destructor Documentation

◆ CaselessStringViewHash() [1/2]

bdlb::CaselessStringViewHash::CaselessStringViewHash ( )
default

◆ CaselessStringViewHash() [2/2]

bdlb::CaselessStringViewHash::CaselessStringViewHash ( const CaselessStringViewHash original)
default

Create a CaselessStringViewHash object. Note that as CaselessStringViewHash is an empty (stateless) type, this operation will have no observable effect.

◆ ~CaselessStringViewHash()

bdlb::CaselessStringViewHash::~CaselessStringViewHash ( )
default

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION() [1/2]

bdlb::CaselessStringViewHash::BSLMF_NESTED_TRAIT_DECLARATION ( CaselessStringViewHash  ,
bsl::is_trivially_copyable   
)

◆ BSLMF_NESTED_TRAIT_DECLARATION() [2/2]

bdlb::CaselessStringViewHash::BSLMF_NESTED_TRAIT_DECLARATION ( CaselessStringViewHash  ,
bsl::is_trivially_default_constructible   
)

◆ operator()()

bsl::size_t bdlb::CaselessStringViewHash::operator() ( bsl::string_view  argument) const

Return a hash code generated from the contents of the specified null-terminated argument string, cast to lower case. The behavior is undefined unless argument points to a null-terminated string.

◆ operator=()

CaselessStringViewHash & bdlb::CaselessStringViewHash::operator= ( const CaselessStringViewHash rhs)
default

Assign to this object the value of the specified rhs object, and a return a reference providing modifiable access to this object. Note that as CaselessStringViewHash is an empty (stateless) type, this operation will have no observable effect.


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