HP aC++/HP C A.06.20 Programmer's Guide

wchar_t Keyword
Wide (or multi-byte) characters can be declared with the data type wchar_t. It is an
integral type that can represent all the codes of the largest character set among the
supported locales defined in the localization library. This keyword was a typedef of
the ANSI C standard.
Usage
This type was added to maintain ANSI C compatibility and to accomodate foreign
(principally Oriental) character sets.
Example
In the following example, literals of type wchar_t consist of the character L followed
by a character constant in single quotes.
void main()
{
wchar_t ch = La;
}
wchar_t must be implemented the same as another integral type. In other words, it
must have the same size, signedness and alignment requirements. It promotes to the
smallest integral type when used in an expression and cannot have a signed or unsigned
modifier.
The standard library includes a string of wide characters known as wstring. The
IOStream library supports I/O of wide characters.
In ANSI C, wchar_t is a synonym for another type, declared using a typedef in a
standard header file.
template Keyword
Use the template keyword when calling a member template to specify that a name
is a member template.
Usage
This construct is used for function calls to indicate that the name is a member template.
Example
struct S {
template <class T> void foo() {}
};
template <class T>
void sam(T x, S y) { y.template foo<T>(); }
HP aC++ Keywords 191