]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix to allow namespace std { namespace tr1 {
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 12 Jun 2008 18:17:28 +0000 (18:17 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 12 Jun 2008 18:17:28 +0000 (18:17 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9893 e03df62e-2008-0410-955e-edbf42e46eb7

include/hash_map.h
include/hashcomp.h

index 345420fc242dc94a515ae7678cc11984d3024b80..3665d9b1a17e0b8f1247b1a18a0826e8914b323b 100644 (file)
                #include <ext/hash_map>
                /** Oddball linux namespace for hash_map */
                #define nspace __gnu_cxx
+               #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
+               #define END_HASHMAP_NAMESPACE }
        #else
                #include <tr1/unordered_map>
                #define hash_map unordered_map
                #define nspace std::tr1
+               #define BEGIN_HASHMAP_NAMESPACE namespace std { namespace tr1 {
+               #define END_HASHMAP_NAMESPACE } } 
        #endif
 #else
        #include <hash_map>
        #define nspace stdext
        /** Oddball windows namespace for hash_map */
        using stdext::hash_map;
+       #define BEGIN_HASHMAP_NAMESPACE namespace nspace {
+       #define END_HASHMAP_NAMESPACE }
 #endif
 
 
index 928abe809c8b8018433f001ca8d2665608fdb248..e93875e3ebc86840f8766c55e1f3fef2a17068c0 100644 (file)
@@ -645,8 +645,8 @@ inline std::string& trim(std::string &str)
 /** Hashing stuff is totally different on vc++'s hash_map implementation, so to save a buttload of
  * #ifdefs we'll just do it all at once
  */
-namespace nspace
-{
+BEGIN_HASHMAP_NAMESPACE
+
        /** Hashing function to hash irc::string
         */
 #ifdef WINDOWS
@@ -711,7 +711,8 @@ namespace nspace
        * @param n A string to lowercase
        */
        void strlower(char *n);
-}
+
+END_HASHMAP_NAMESPACE
 
 #endif