std::ctype_byname
Min standard notice:
Header: <locale>
std::ctype_byname is a std::ctype facet which encapsulates character classification rules of the locale specified at its construction.
# Declarations
template< class CharT >
class ctype_byname : public std::ctype<CharT>;
# Parameters
name: the name of the localerefs: the number of references that link to the facet
# Notes
std::ctype_byname
# Example
#include <iostream>
#include <locale>
int main()
{
wchar_t c = L'\u00de'; // capital letter thorn
std::locale loc("C");
std::cout << "isupper('Þ', C locale) returned "
<< std::boolalpha << std::isupper(c, loc) << '\n';
loc = std::locale(loc, new std::ctype_byname<wchar_t>("en_US.utf8"));
std::cout << "isupper('Þ', C locale with Unicode ctype) returned "
<< std::boolalpha << std::isupper(c, loc) << '\n';
}
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 16 | C++98 | the definition of the explicit specialization std::ctype_byname | corrected |
| LWG 616 | C++98 | the typename disambiguator was missing in the definition of mask | added |