BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlb::TransparentHash Struct Reference

#include <bdlb_transparenthash.h>

Detailed Description

This struct defines a hash operation for different types, enabling them for use for heterogeneous lookup in the standard associative containers such as bsl::unordered_map.

Note
Note that this class is an empty POD type.

See bdlb_transparenthash

Public Types

typedef void is_transparent
 

Public Member Functions

 TransparentHash ()=default
 
 TransparentHash (const TransparentHash &original)=default
 
 ~TransparentHash ()=default
 
TransparentHashoperator= (const TransparentHash &rhs)=default
 
template<class TYPE >
std::size_t operator() (const TYPE &value) const
 

Member Typedef Documentation

◆ is_transparent

Type alias indicating this is a transparent hash functor.

Constructor & Destructor Documentation

◆ TransparentHash() [1/2]

bdlb::TransparentHash::TransparentHash ( )
default

Create a TransparentHash object.

◆ TransparentHash() [2/2]

bdlb::TransparentHash::TransparentHash ( const TransparentHash original)
default

Create a TransparentHash object.

Note
Note that as TransparentHash is an empty (stateless) type, this operation has no observable effect.

◆ ~TransparentHash()

bdlb::TransparentHash::~TransparentHash ( )
default

Destroy this object.

Member Function Documentation

◆ operator()()

template<class TYPE >
std::size_t bdlb::TransparentHash::operator() ( const TYPE &  value) const
inline

Return a hash code generated from the contents of the specified value.

◆ operator=()

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

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.

Note
Note that as TransparentHash is an empty (stateless) type, this operation has no observable effect.

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