]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/hash_map.h
Nuke trailing spaces
[user/henk/code/inspircd.git] / include / hash_map.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef INSPIRCD_HASHMAP_H
15 #define INSPIRCD_HASHMAP_H
16
17 /** Where hash_map is varies from compiler to compiler
18  * as it is not standard unless we have tr1.
19  */
20 #ifndef WIN32
21         #ifndef HASHMAP_DEPRECATED
22                 #include <ext/hash_map>
23                 /** Oddball linux namespace for hash_map */
24                 #define nspace __gnu_cxx
25                 #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
26                 #define END_HASHMAP_NAMESPACE }
27         #else
28                 /** Yay, we have tr1! */
29                 #include <tr1/unordered_map>
30                 /** Not so oddball linux namespace for hash_map with gcc 4.0 and above */
31                 #define hash_map unordered_map
32                 #define nspace std::tr1
33                 #define BEGIN_HASHMAP_NAMESPACE namespace std { namespace tr1 {
34                 #define END_HASHMAP_NAMESPACE } }
35         #endif
36 #else
37         #include <hash_map>
38         #define nspace stdext
39         /** Oddball windows namespace for hash_map */
40         using stdext::hash_map;
41         #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
42         #define END_HASHMAP_NAMESPACE }
43 #endif
44
45 #endif