diff options
author | Son Dinh <dinhs@objectcomputing.com> | 2020-04-16 13:00:52 -0500 |
---|---|---|
committer | Son Dinh <dinhs@objectcomputing.com> | 2020-04-16 13:00:52 -0500 |
commit | f206fe4e74e77bd09dee33e7c80e794883b49308 (patch) | |
tree | e8c5b05e54cf75994823b7763fea788b9af8a190 /ACE/ace/Functor.h | |
parent | 94ee14a015c942500cbd06316dd07de2b540e6b4 (diff) | |
download | ATCD-f206fe4e74e77bd09dee33e7c80e794883b49308.tar.gz |
added hash for long long and unsigned long long
Diffstat (limited to 'ACE/ace/Functor.h')
-rw-r--r-- | ACE/ace/Functor.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ACE/ace/Functor.h b/ACE/ace/Functor.h index e01b79c8a13..90a9d58f0ef 100644 --- a/ACE/ace/Functor.h +++ b/ACE/ace/Functor.h @@ -200,7 +200,22 @@ public: unsigned long operator () (unsigned long t) const; }; -#if (ACE_SIZEOF_LONG < 8) +template<> +class ACE_Export ACE_Hash<long long> +{ +public: + /// Simply returns t + unsigned long operator () (long long t) const; +}; + +template<> +class ACE_Export ACE_Hash<unsigned long long> +{ +public: + unsigned long operator () (unsigned long long t) const; +}; + +#if ((ACE_SIZEOF_LONG < 8) && (ACE_SIZEOF_LONG_LONG < 8)) /** * @brief Function object for hashing a signed 64-bit number */ @@ -213,7 +228,7 @@ public: }; #endif /* ACE_SIZEOF_LONG < 8 */ -#if (ACE_SIZEOF_LONG < 8) +#if ((ACE_SIZEOF_LONG < 8) && (ACE_SIZEOF_LONG_LONG < 8)) /** * @brief Function object for hashing an unsigned 64-bit number */ |