0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 23:44:01 +01:00

ircd: Add rfc1459::less overload on string pointers.

This commit is contained in:
Jason Volk 2016-08-19 18:48:56 -07:00
parent 3be7557d53
commit 271aa22aee

View file

@ -72,6 +72,7 @@ using character::tolower;
struct less struct less
{ {
bool operator()(const std::string &a, const std::string &b) const; bool operator()(const std::string &a, const std::string &b) const;
bool operator()(const std::string *const &a, const std::string *const &b) const;
}; };
inline bool is_print(const char &c) { return is(c, character::PRINT); } inline bool is_print(const char &c) { return is(c, character::PRINT); }
@ -103,6 +104,14 @@ inline bool is_xdigit(const char &c)
return is_digit(c) || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F'); return is_digit(c) || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F');
} }
inline bool
less::operator()(const std::string *const &a,
const std::string *const &b)
const
{
return operator()(*a, *b);
}
inline bool inline bool
less::operator()(const std::string &a, less::operator()(const std::string &a,
const std::string &b) const std::string &b)