Standard C++ Library Reference ISO/IEC (VERSION3)
ctype_base
class ctype_base {
public:
 enum mask {
 space = 1 << 0, // EXAMPLE VALUES ONLY
 print = 1 << 1,
 cntrl = 1 << 2,
 upper = 1 << 3,
 lower = 1 << 4,
 digit = 1 << 5,
 punct = 1 << 6,
 xdigit = 1 << 7,
 alpha = 1 << 8,
 alnum = 0x9 << 5,
 graph = 0xB << 5};
The class serves as a base class for facets of template class ctype. It defines just the enumeration mask. Each of the
enumeration constants characterizes a different way to classify characters, as defined by the functions with similar names
declared in the header <ctype.h>. The constants are:
space (function isspace)● 
print (function isprint)● 
cntrl (function iscntrl)● 
upper (function isupper)● 
lower (function islower)● 
digit (function isdigit)● 
punct (function ispunct)● 
xdigit (function isxdigit)● 
alpha (function isalpha)● 
alnum (function isalnum)● 
graph (function isgraph)● 
You can charaterize a combination of classifications by ORing these constants. In particular, it is always true that
alnum == (alpha | digit) and graph == (alnum | punct).
ctype_byname
template<class Elem>
 class ctype_byname : public ctype<Elem> {
public:
 explicit ctype_byname(const char *locname,
 size_t refs = 0);
protected:
 ~ctype_byname();
 };
The template class describes an object that can serve as a locale facet of type ctype<Elem>. Its behavior is determined
by the named locale locname. The constructor initializes its base object with ctype<Elem>(refs) (or the
equivalent for base class ctype<char>).










