8#ifndef INCLUDED_BSLSTP_HASH
9#define INCLUDED_BSLSTP_HASH
93#include <bslscm_version.h>
104#ifndef BDE_OMIT_INTERNAL_DEPRECATED
105#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
121template <
class HASH_KEY>
struct Hash;
123template <>
struct Hash<char>;
124template <>
struct Hash<signed char>;
125template <>
struct Hash<unsigned char>;
126template <>
struct Hash<short>;
127template <>
struct Hash<unsigned short>;
128template <>
struct Hash<int>;
129template <>
struct Hash<unsigned int>;
130template <>
struct Hash<long>;
131template <>
struct Hash<unsigned long>;
132template <>
struct Hash<long long>;
133template <>
struct Hash<unsigned long long>;
144template <
class HASH_KEY>
148 typedef ::bsl::hash<HASH_KEY>
Type;
155template <
class HASH_KEY>
238 unsigned long result = 0;
241 result = 5 * result + *s;
244 return std::size_t(result);
396#ifdef BSLS_PLATFORM_CPU_64_BIT
399struct Hash<long long> {
407 std::size_t operator()(
long long x)
const
415struct Hash<unsigned long long> {
423 std::size_t operator()(
unsigned long long x)
const
442 return (std::size_t)(x ^ (x >> 32));
447struct Hash<unsigned long long> {
457 return (std::size_t)(x ^ (x >> 32));
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bslstp_exfunctional.h:323
Definition bslstl_hash.h:498
Definition bslmf_istriviallycopyable.h:329
Definition bslstp_hash.h:228
std::size_t operator()(const char *s) const
Return a hash value computed using the specified s.
Definition bslstp_hash.h:236
BSLMF_NESTED_TRAIT_DECLARATION(HashCString, bsl::is_trivially_copyable)
Hash< char > Type
Definition bslstp_hash.h:169
HashSelector< HASH_KEY >::Type Type
Definition bslstp_hash.h:159
HashCString Type
Definition bslstp_hash.h:164
Hash< int > Type
Definition bslstp_hash.h:194
Hash< long > Type
Definition bslstp_hash.h:204
Hash< long long > Type
Definition bslstp_hash.h:214
Hash< short > Type
Definition bslstp_hash.h:184
Hash< signed char > Type
Definition bslstp_hash.h:174
Hash< unsigned char > Type
Definition bslstp_hash.h:179
Hash< unsigned int > Type
Definition bslstp_hash.h:199
Hash< unsigned long > Type
Definition bslstp_hash.h:209
Hash< unsigned long long > Type
Definition bslstp_hash.h:219
Hash< unsigned short > Type
Definition bslstp_hash.h:189
Definition bslstp_hash.h:145
::bsl::hash< HASH_KEY > Type
Definition bslstp_hash.h:148
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(char x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:262
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(int x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:342
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(long x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:374
std::size_t operator()(unsigned long long x) const
Definition bslstp_hash.h:439
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(short x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:310
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(signed char x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:294
std::size_t operator()(unsigned char x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:278
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(unsigned int x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:358
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(unsigned long x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:390
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(unsigned long long x) const
Definition bslstp_hash.h:454
BSLMF_NESTED_TRAIT_DECLARATION(Hash, bsl::is_trivially_copyable)
std::size_t operator()(unsigned short x) const
Return a hash value computed using the specified x.
Definition bslstp_hash.h:326
Definition bslstp_hash.h:121