24 #ifndef SPOT_MISC_HASH_HH
25 # define SPOT_MISC_HASH_HH
28 # include <functional>
30 # include "misc/_config.h"
32 #ifdef SPOT_HAVE_UNORDERED_MAP
33 # include <unordered_map>
34 # include <unordered_set>
36 # define hash_map unordered_map
37 # define hash_multimap unordered_multimap
38 # define hash_set unordered_set
40 #ifdef SPOT_HAVE_TR1_UNORDERED_MAP
41 # include <tr1/unordered_map>
42 # include <tr1/unordered_set>
43 namespace Sgi = std::tr1;
44 # define hash_map unordered_map
45 # define hash_multimap unordered_multimap
46 # define hash_set unordered_set
48 #ifdef SPOT_HAVE_EXT_HASH_MAP
49 # include <ext/hash_map>
50 # include <ext/hash_set>
51 # if __GNUC__ == 3 && __GNUC_MINOR__ == 0
54 namespace Sgi = ::__gnu_cxx;
57 # if defined(__GNUC__) && (__GNUC__ < 3)
58 # include <hash_map.h>
59 # include <hash_set.h>
83 public std::unary_function<const T*, size_t>
88 - static_cast<const char*>(0));
95 #if defined(SPOT_HAVE_UNORDERED_MAP) || defined(SPOT_HAVE_TR1_UNORDERED_MAP)
97 #else // e.g. GCC < 4.3
99 public Sgi::hash<const char*>,
100 public std::unary_function<const std::string&, size_t>
102 size_t operator()(
const std::string& s)
const
106 return Sgi::hash<const char*>::operator()(s.c_str());
116 public std::unary_function<const T&, size_t>
125 #endif // SPOT_MISC_HASH_HH