summaryrefslogtreecommitdiff
path: root/include/hashcomp.h
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-15 11:32:49 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-15 11:32:49 +0000
commit01ce98f2746be837a64f5f9ed2c36eeaabae7462 (patch)
tree83e0a640f913a78861cc321bc9aaf67089b2b305 /include/hashcomp.h
parent74a515a72f08fc85d8d59cb7207fba9ece51215f (diff)
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
Diffstat (limited to 'include/hashcomp.h')
-rw-r--r--include/hashcomp.h10
1 files changed, 5 insertions, 5 deletions
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<irc::string, std::less<irc::string> >
{
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<std::string>
+ CoreExport template<> struct hash<std::string>
#endif
{
- size_t operator()(const std::string &s) const;
+ size_t CoreExport operator()(const std::string &s) const;
};
#endif