tbb_hash_compare クラス

概要

concurrent_hash_map のデフォルトの HashCompare

構文

template<typename Key> struct tbb_hash_compare;

ヘッダー

#include "tbb/concurrent_hash_map.h"

説明

tbb_hash_compare<Key> は、concurrent_hash_map テンプレート・クラスの HashCompare 引数のデフォルトです。 メンバーの説明で示すように、ビルトインの定義は operator==tbb_hasher に依存します。 独自の型で、tbb_hash_compare テンプレートの特殊化または tbb_hasher のオーバーロードを定義できます。

次の Key 型については、tbb_hasher のビルトインの定義があります。

メンバー

 namespace tbb {
        template<typename Key>
        struct tbb_hash_compare {
            static size_t hash(const Key& a) {
                return tbb_hasher(a);
            }
            static bool equal(const Key& a, const Key& b) {
                return a==b;
            }
        };
     
        template<typename T> 
        size_t tbb_hasher(const T&);
     
        template<typename T> 
        size_t tbb_hasher(T*);
     
        template<typename T, typename Traits, typename Alloc>
        size_t tbb_hasher(const std::basic_string<T, Traits,Alloc>&);
     
        template<typename T1, typename T2>
        size_t tbb_hasher(const std::pair<T1,T2>& );
            };