A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sgi-hashmap.h
Go to the documentation of this file.
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  #ifdef __clang__
25  #undef __DEPRECATED
26  #endif
27  #include <ext/hash_map>
28 namespace sgi = ::__gnu_cxx;
29  #else
30 #undef __DEPRECATED
31  #include <backward/hash_map>
32 namespace sgi = ::__gnu_cxx;
33  #endif
34  #endif
35  #endif
36 #else // ... there are other compilers, right?
37 namespace sgi = std;
38 #endif
39 
40 
41 #endif /* SGI_HASHMAP_H */