Thea
UnorderedSet.hpp
1 //============================================================================
2 //
3 // This file is part of the Thea toolkit.
4 //
5 // This software is distributed under the BSD license, as detailed in the
6 // accompanying LICENSE.txt file. Portions are derived from other works:
7 // their respective licenses and copyright information are reproduced in
8 // LICENSE.txt and/or in the relevant source files.
9 //
10 // Author: Siddhartha Chaudhuri
11 // First version: 2011
12 //
13 //============================================================================
14 
15 #ifndef __Thea_UnorderedSet_hpp__
16 #define __Thea_UnorderedSet_hpp__
17 
18 #include "Platform.hpp"
19 #include <unordered_set>
20 
21 namespace Thea {
22 
24 template < typename T,
25  typename Hash = std::hash<T>,
26  typename Pred = std::equal_to<T>,
27  typename Alloc = std::allocator<T>
28  > using UnorderedSet = std::unordered_set<T, Hash, Pred, Alloc>;
29 
31 template < typename T,
32  typename Hash = std::hash<T>,
33  typename Pred = std::equal_to<T>,
34  typename Alloc = std::allocator<T>
35  > using UnorderedMultiSet = std::unordered_multiset<T, Hash, Pred, Alloc>;
36 
37 } // namespace Thea
38 
39 #endif
Root namespace for the Thea library.
std::unordered_multiset< T, Hash, Pred, Alloc > UnorderedMultiSet
Hash table-based set of objects, with possible duplication.
std::unordered_set< T, Hash, Pred, Alloc > UnorderedSet
Hash table-based set of objects.
This file must be included in every file in the project, before any other include.