BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg::HashUtil Struct Reference

#include <bslalg_hashutil.h>

Static Public Member Functions

static std::size_t computeHash (char key)
 
static std::size_t computeHash (signed char key)
 
static std::size_t computeHash (unsigned char key)
 
static std::size_t computeHash (short key)
 
static std::size_t computeHash (unsigned short key)
 
static std::size_t computeHash (int key)
 
static std::size_t computeHash (unsigned int key)
 
static std::size_t computeHash (long key)
 
static std::size_t computeHash (unsigned long key)
 
static std::size_t computeHash (long long key)
 
static std::size_t computeHash (unsigned long long key)
 
static std::size_t computeHash (float key)
 
static std::size_t computeHash (double key)
 
static std::size_t computeHash (const void *key)
 

Member Function Documentation

◆ computeHash() [1/14]

static std::size_t bslalg::HashUtil::computeHash ( char  key)
static

Return a size_t hash value corresponding to the specified key. Note that the return value is seemingly random (i.e., the hash is good) but identical on all platforms (irrespective of endianness).

NOTE: We reserve the right to change these hash functions to return different values. The current implementation only returns a 32 bit value – when std::size_t is 64 bits, the high-order 32 bits of the return value are all zero. This is not a feature, it is a bug that we will fix in a later release.

◆ computeHash() [2/14]

static std::size_t bslalg::HashUtil::computeHash ( const void *  key)
static

◆ computeHash() [3/14]

static std::size_t bslalg::HashUtil::computeHash ( double  key)
static

◆ computeHash() [4/14]

static std::size_t bslalg::HashUtil::computeHash ( float  key)
static

◆ computeHash() [5/14]

static std::size_t bslalg::HashUtil::computeHash ( int  key)
static

◆ computeHash() [6/14]

static std::size_t bslalg::HashUtil::computeHash ( long  key)
static

◆ computeHash() [7/14]

static std::size_t bslalg::HashUtil::computeHash ( long long  key)
static

◆ computeHash() [8/14]

static std::size_t bslalg::HashUtil::computeHash ( short  key)
static

◆ computeHash() [9/14]

static std::size_t bslalg::HashUtil::computeHash ( signed char  key)
static

◆ computeHash() [10/14]

static std::size_t bslalg::HashUtil::computeHash ( unsigned char  key)
static

◆ computeHash() [11/14]

static std::size_t bslalg::HashUtil::computeHash ( unsigned int  key)
static

◆ computeHash() [12/14]

static std::size_t bslalg::HashUtil::computeHash ( unsigned long  key)
static

◆ computeHash() [13/14]

static std::size_t bslalg::HashUtil::computeHash ( unsigned long long  key)
static

◆ computeHash() [14/14]

static std::size_t bslalg::HashUtil::computeHash ( unsigned short  key)
static

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