Class intrusive_hash_set

Synopsis

#include <include/EASTL/intrusive_hash_set.h>

template <typename T, size_t bucketCount, typename Hash = eastl::hash<T>, typename Equal = eastl::equal_to<T> >
class intrusive_hash_set : public intrusive_hashtable<T, T, Hash, Equal, bucketCount, true, true>

Description

intrusive_hash_set

Template parameters: T The type of object the set holds (a.k.a. value). bucketCount The number of buckets to use. Best if it's a prime number. Hash Hash function. See functional.h for examples of hash functions. Equal Equality testing predicate; tells if two elements are equal.

Mentioned in

Inheritance

Ancestors: intrusive_hashtable

Methods

intrusive_hash_set

Source

Lines 31-48 in include/EASTL/intrusive_hash_set.h.

template <typename T, size_t bucketCount, typename Hash = eastl::hash<T>, typename Equal = eastl::equal_to<T> >
class intrusive_hash_set : public intrusive_hashtable<T, T, Hash, Equal, bucketCount, true, true>
{
public:
    typedef intrusive_hashtable<T, T, Hash, Equal, bucketCount, true, true>     base_type;
    typedef intrusive_hash_set<T, bucketCount, Hash, Equal>                     this_type;
public:
    explicit intrusive_hash_set(const Hash& h = Hash(), const Equal& eq = Equal())
        : base_type(h, eq)
    {
        // Empty
    }
    // To consider: Is this feasible, given how initializer_list works by creating a temporary array? Even if it is feasible, is it a good idea?
    //intrusive_hash_set(std::initializer_list<value_type> ilist);
}; // intrusive_hash_set





Add Discussion as Guest

Log in