Class intrusive_hash_multiset

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_multiset : public intrusive_hashtable<T, T, Hash, Equal, bucketCount, true, false>

Description

intrusive_hash_multiset

Implements a intrusive_hash_multiset, which is the same thing as a intrusive_hash_set except that contained elements need not be unique. See the documentation for intrusive_hash_set for details.

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_multiset

Source

Lines 65-82 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_multiset : public intrusive_hashtable<T, T, Hash, Equal, bucketCount, true, false>
{
public:
    typedef intrusive_hashtable<T, T, Hash, Equal, bucketCount, true, false>    base_type;
    typedef intrusive_hash_multiset<T, bucketCount, Hash, Equal>                this_type;
public:
    explicit intrusive_hash_multiset(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_multiset(std::initializer_list<value_type> ilist);
}; // intrusive_hash_multiset





Add Discussion as Guest

Log in