diff options
author | Adam <Adam@anope.org> | 2011-11-08 17:29:16 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-11-08 17:29:16 -0500 |
commit | b5ff856f47d8e54d12c568462a06351633c29610 (patch) | |
tree | a4e2f96c59ee49aa5e6cacdfd30db6155151ad36 /include/hashcomp.h | |
parent | 97b9055f92f21cd91af44a3d5dacce0024536cff (diff) |
Windows
Diffstat (limited to 'include/hashcomp.h')
-rw-r--r-- | include/hashcomp.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h index d78b01857..a4a86889f 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -139,6 +139,16 @@ namespace irc /** This typedef declares irc::string based upon irc_char_traits. */ typedef std::basic_string<char, irc_char_traits, std::allocator<char> > string; + + struct CoreExport less + { + /** Compare two Anope::strings as irc::strings and find which one is less + * @param s1 The first string + * @param s2 The second string + * @return true if s1 < s2, else false + */ + bool operator()(const Anope::string &s1, const Anope::string &s2) const; + }; } /** The ci namespace contains a number of helper classes. @@ -193,16 +203,9 @@ namespace ci /** This typedef declares ci::string based upon ci_char_traits. */ typedef std::basic_string<char, ci_char_traits, std::allocator<char> > string; -} -namespace std -{ - /** An overload for std::less<ci::string> that uses Anope::string, passed for the third template argument - * to std::map and std::multimap - */ - template<> struct CoreExport less<ci::string> + struct CoreExport less { - public: /** Compare two Anope::strings as ci::strings and find which one is less * @param s1 The first string * @param s2 The second string @@ -210,20 +213,6 @@ namespace std */ bool operator()(const Anope::string &s1, const Anope::string &s2) const; }; - - /** An overload for std;:less<irc::string> that uses Anope::string, passed for the third tempalte argument - * to std::map and std::multimap - */ - template<> struct CoreExport less<irc::string> - { - public: - /** Compare two Anope::strings as irc::strings and find which one is less - * @param s1 The first string - * @param s2 The second string - * @return true if s1 < s2, else false - */ - bool operator()(const Anope::string &s1, const Anope::string &s2) const; - }; } /* Define operators for + and == with irc::string to std::string for easy assignment |