Use ADL to skip std:: qualifier

Take advantage of argument-dependent lookup (ADL) to
avoid specifying std:: qualifier in some STL functions.
When a function argument refers to a namespace (in this
case std) then the compiler will search the unqualified
function in that namespace too.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-12-18 20:48:59 +01:00
parent a77a3b723f
commit 939b621e5c
2 changed files with 7 additions and 7 deletions

View File

@@ -33,7 +33,7 @@ OptionsMap Options; // Global object
static bool ci_less(char c1, char c2) { return tolower(c1) < tolower(c2); }
bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const {
return std::lexicographical_compare(s1.begin(), s1.end(), s2.begin(), s2.end(), ci_less);
return lexicographical_compare(s1.begin(), s1.end(), s2.begin(), s2.end(), ci_less);
}