18 #ifndef ION_BASE_STLALLOC_ALLOCUNORDEREDSET_H_
19 #define ION_BASE_STLALLOC_ALLOCUNORDEREDSET_H_
21 #include <unordered_set>
49 template <
typename Value,
50 typename Hash = ::std::hash<Value>,
51 typename Pred = ::std::equal_to<Value> >
53 :
public std::unordered_set<Value, Hash, Pred, StlAllocator<Value> > {
56 typedef std::unordered_set<Value, Hash, Pred, AllocType>
SetType;
59 :
SetType(kBucketCountHint, Hash(), Pred(),
62 :
SetType(kBucketCountHint, Hash(), Pred(),
63 AllocType(owner.GetNonNullAllocator())) {}
67 template <
typename ContainerT>
69 :
SetType(from.begin(), from.end(), kBucketCountHint, Hash(), Pred(),
71 template <
typename ContainerT>
73 :
SetType(from.begin(), from.end(), kBucketCountHint, Hash(), Pred(),
74 AllocType(owner.GetNonNullAllocator())) {}
80 enum { kBucketCountHint = 10 };
86 #endif // ION_BASE_STLALLOC_ALLOCUNORDEREDSET_H_
StlAllocator is derived std::allocator class that allows an Ion Allocator to be used for STL containe...
AllocationManager is a singleton class that is used to manage Allocators used to allocate Ion objects...
AllocUnorderedSet(const AllocatorPtr &alloc)
std::unordered_set< Value, Hash, Pred, AllocType > SetType
This class can be used in place of std::unordered_set to allow an Ion Allocator to be used for memory...
Allocatable is an abstract base class for classes whose memory is managed by an Allocator.
AllocUnorderedSet(const AllocatorPtr &alloc, const ContainerT &from)
These constructors can be used to copy from "STL iterables": anything that provides a pair of compati...
AllocUnorderedSet(const Allocatable &owner, const ContainerT &from)
AllocUnorderedSet(const Allocatable &owner)
StlAllocator< Value > AllocType