A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
sgi-hashmap.h
1 /* This code snippet was ripped out of the gcc
2  * documentation and slightly modified to work
3  * with gcc 4.x
4  */
5 #ifndef SGI_HASHMAP_H
6 #define SGI_HASHMAP_H
7 
8 /* To use gcc extensions.
9  */
10 #ifdef __GNUC__
11  #if __GNUC__ < 3
12  #include <hash_map.h>
13 namespace sgi { using ::hash_map; }; // inherit globals
14  #else
15  #if __GNUC__ < 4
16  #include <ext/hash_map>
17  #if __GNUC_MINOR__ == 0
18 namespace sgi = std; // GCC 3.0
19  #else
20 namespace sgi = ::__gnu_cxx; // GCC 3.1 and later
21  #endif
22  #else // gcc 4.x and later
23  #if __GNUC_MINOR__ < 3
24  #include <ext/hash_map>
25 namespace sgi = ::__gnu_cxx;
26  #else
27 #undef __DEPRECATED
28  #include <backward/hash_map>
29 namespace sgi = ::__gnu_cxx;
30  #endif
31  #endif
32  #endif
33 #else // ... there are other compilers, right?
34 namespace sgi = std;
35 #endif
36 
37 
38 #endif /* SGI_HASHMAP_H */