Rule A2-13-3 (required, architecture / design / implementation,automated)

Type wchar_t shall not be used.

Rationale

Width of wchar_t type is implementation-defined. Types char16_t and char32_t should be used instead.

Example

//% $Id: A2-13-3.cpp 305629 2018-01-29 13:29:25Z piotr.serwa $
char16_t string1[] = u"ABC"; // Compliant
char32_t string2[] = U"DEF"; // Compliant
wchar_t string3[] = L"GHI"; // Non-compliant

See also

none