bool operator()(const string& lhs, const string& rhs);
The member function effectively executes:
const collate<E>& fac = use_fac<collate<E> >(*this);
return (fac.compare(lhs.begin(), lhs.end(),
rhs.begin(), rhs.end()) < 0);
Thus, you can use a locale object as a function object.
In this implementation, if a translator does not support member template functions, the template:
template<class E, class T, class A>
bool operator()(const basic_string<E, T, A>& lhs,
const basic_string<E, T, A>& rhs);
is replaced by:
bool operator()(const string& lhs, const string& rhs);