From 01ce98f2746be837a64f5f9ed2c36eeaabae7462 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 15 Aug 2009 11:32:49 +0000 Subject: win: Last part of support required for VS2010: NEEDS COMPILE TESTING ON: gcc3 (if possible), gcc4, vs2008. - Check for vs2010 in hash_map.h - use unordered_map if it exists - change all map creations to: #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) // old windows crap #else #if HASHMAP_DEPRECATED // tr1/gcc crap #endif #endif git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11524 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/hashcomp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/hashcomp.h') diff --git a/include/hashcomp.h b/include/hashcomp.h index 94c836c6f..536c42937 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -627,13 +627,13 @@ 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 + * #ifdefs we'll just do it all at once. Except, of course, with TR1, when it's the same as GCC. */ BEGIN_HASHMAP_NAMESPACE /** Hashing function to hash irc::string */ -#ifdef WINDOWS +#if defined(WINDOWS) && !defined(HAS_TR1_UNORDERED) template<> class CoreExport hash_compare > { public: @@ -679,7 +679,7 @@ BEGIN_HASHMAP_NAMESPACE * @param s A string to hash * @return The hash value */ - size_t operator()(const irc::string &s) const; + size_t CoreExport operator()(const irc::string &s) const; }; /* XXX FIXME: Implement a hash function overriding std::string's that works with TR1! */ @@ -687,10 +687,10 @@ BEGIN_HASHMAP_NAMESPACE #ifdef HASHMAP_DEPRECATED struct insensitive #else - template<> struct hash + CoreExport template<> struct hash #endif { - size_t operator()(const std::string &s) const; + size_t CoreExport operator()(const std::string &s) const; }; #endif -- cgit v1.2.3