OpenASIP  2.0
hash_set.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file hash_set.hh
26  *
27  * @author Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)
28  *
29  * Definition for a hash set.
30  *
31  * Hash set provides amortized constant time access for situations in which
32  * the keys need not to be stored in sorted order. hash_set is not provided
33  * by STL. It's usually provided as an STL extension. For example, SGI STL
34  * implements it. This header selects the best possible implementation
35  * for hash_set available in the system.
36  */
37 
38 #include "tce_config.h"
39 
40 #if defined(STD_TR1_UNORDERED_MAP)
41 
42 #include <tr1/unordered_set>
43 
44 using std::tr1::unordered_set;
45 #define hash_set unordered_set
46 
47 #elif defined(STD_UNORDERED_MAP)
48 
49 #include <unordered_set>
50 using std::unordered_set;
51 #define hash_set unordered_set
52 
53 #elif defined(HASHMAP_GNU_EXT)
54 
55 #include <ext/hash_set>
56 
58 
59 #elif defined(HASHMAP_STD)
60 
61 #include <hash_set>
62 
63 using std::hash_set;
64 
65 #else
66 
67 #warning Pretending std::set to be hash_set.
68 
69 #define hash_set std::set
70 
71 #endif
72 
73 /// @todo Check for STLport hash_map
74 /// @todo Check for Intel's compiler. It seems Intel's compiler provides
75 /// compatibility for GNU so HASHMAP_GNU_EXT gets defined.
76 
77 // include this header before including adjacency_list.hpp so we get a working
78 // hash_set without and deprecation warnings etc.
79 #define BOOST_NO_HASH
hash_set
#define hash_set
Definition: hash_set.hh:69