class template
<locale>
std::collate
template <class charT> class collate;
Facet to compare and hash strings
|  |
collate |
The
collate class provides functions to compare and assist in comparing strings for a specific locale and taking into consideration multi-byte character string, when used.
collate objects are prevented to be locally constructed by having a protected destructor. Only those installed in
locale objects should be used through mechanisms such as
use_facet.
This template class has one template parameter, representing the character type for which the facet returns information. This template parameter is referred in this entire reference as
charT.
Public members
It includes the following public member functions:
- (constructor)
- collate constructor (public member function)
- compare
- Compare character sequences (public member function)
- transform
- Transform character sequence (public member function)
- hash
- Get hash value (public member function)
Along with the following public member types:
- char_type
- Character type (public member type)
- string_type
- String type (public member type)
Virtual protected members
The class defines the virtual protected members in charge of implementing the expected behavior of their corresponding public member functions:
- do_compare
- Compare character sequences [virtual] (protected virtual member function)
- do_transform
- Transform character sequence [virtual] (protected virtual member function)
- do_hash
- Get has value [virtual] (protected virtual member function)
Along with the class destructor:
- (destructor)
- collate destructor (protected member function)
collate specializations: numpunct<char> and numpunct<wchar_t>
Two standard specializations define the standard behavior for the
char and
wchar_t types. In these, the member function
compare uses lexicographical ordering (just like
lexicographical_compare).