template<class E>
class collate : public locale::facet {
public:
typedef E char_type;
typedef basic_string<E> string_type;
explicit collate(size_t refs = 0);
int compare(const E *first1, const E *last1,
const E *first2, const E *last2) const;
string_type transform(const E *first, const E *last) const;
long hash(const E *first, const E *last) const;
static locale::id id;
protected:
~collate();
virtual int do_compare(const E *first1, const E *last1,
const E *first2, const E *last2) const;
virtual string_type do_transform(const E *first, const E *last) const;
virtual long do_hash(const E *first, const E *last) const;
};
The template class describes an object that can serve as a locale facet, to control comparisons of sequences of type E
.
As with any locale facet, the static object id
has an initial stored value of zero. The first attempt to access its stored
value stores a unique positive value in id
.