2007-07-16 17:30:04 +00:00
|
|
|
/* +------------------------------------+
|
|
|
|
* | Inspire Internet Relay Chat Daemon |
|
|
|
|
* +------------------------------------+
|
|
|
|
*
|
2009-01-02 18:16:05 +00:00
|
|
|
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
|
2009-03-15 12:42:35 +00:00
|
|
|
* See: http://wiki.inspircd.org/Credits
|
2007-07-16 17:30:04 +00:00
|
|
|
*
|
|
|
|
* This program is free but copyrighted software; see
|
|
|
|
* the file COPYING for details.
|
|
|
|
*
|
|
|
|
* ---------------------------------------------------
|
|
|
|
*/
|
2009-02-14 21:14:36 +00:00
|
|
|
|
2007-07-16 17:30:04 +00:00
|
|
|
#ifndef INSPIRCD_HASHMAP_H
|
|
|
|
#define INSPIRCD_HASHMAP_H
|
|
|
|
|
|
|
|
/** Where hash_map is varies from compiler to compiler
|
2008-09-20 21:14:25 +00:00
|
|
|
* as it is not standard unless we have tr1.
|
2007-07-16 17:30:04 +00:00
|
|
|
*/
|
|
|
|
#ifndef WIN32
|
2008-06-12 17:40:40 +00:00
|
|
|
#ifndef HASHMAP_DEPRECATED
|
|
|
|
#include <ext/hash_map>
|
|
|
|
/** Oddball linux namespace for hash_map */
|
|
|
|
#define nspace __gnu_cxx
|
2008-06-12 18:17:28 +00:00
|
|
|
#define BEGIN_HASHMAP_NAMESPACE namespace nspace {
|
|
|
|
#define END_HASHMAP_NAMESPACE }
|
2008-06-12 17:40:40 +00:00
|
|
|
#else
|
2008-09-20 21:14:25 +00:00
|
|
|
/** Yay, we have tr1! */
|
2008-06-12 17:40:40 +00:00
|
|
|
#include <tr1/unordered_map>
|
2008-09-20 21:14:25 +00:00
|
|
|
/** Not so oddball linux namespace for hash_map with gcc 4.0 and above */
|
2008-06-12 17:40:40 +00:00
|
|
|
#define hash_map unordered_map
|
|
|
|
#define nspace std::tr1
|
2008-06-12 18:17:28 +00:00
|
|
|
#define BEGIN_HASHMAP_NAMESPACE namespace std { namespace tr1 {
|
2009-02-14 21:14:36 +00:00
|
|
|
#define END_HASHMAP_NAMESPACE } }
|
2008-06-12 17:40:40 +00:00
|
|
|
#endif
|
2007-07-16 17:30:04 +00:00
|
|
|
#else
|
2008-06-12 17:40:40 +00:00
|
|
|
#include <hash_map>
|
|
|
|
#define nspace stdext
|
|
|
|
/** Oddball windows namespace for hash_map */
|
|
|
|
using stdext::hash_map;
|
2008-06-12 18:17:28 +00:00
|
|
|
#define BEGIN_HASHMAP_NAMESPACE namespace nspace {
|
|
|
|
#define END_HASHMAP_NAMESPACE }
|
2007-07-16 17:30:04 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|