1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef INSPIRCD_HASHMAP_H
15 #define INSPIRCD_HASHMAP_H
17 /** Where hash_map is varies from compiler to compiler
18 * as it is not standard unless we have tr1.
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 }
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 } }
39 /** Oddball windows namespace for hash_map */
40 using stdext::hash_map;
41 #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
42 #define END_HASHMAP_NAMESPACE }