22 Localization library [localization]

22.6 C library locales [c.locales]

Table [tab:localization.hdr.clocale] describes header <clocale>.

Table 93 — Header <clocale> synopsis
TypeName(s)
Macros: LC_ALL LC_COLLATE LC_CTYPE
LC_MONETARY LC_NUMERIC LC_TIME
NULL
Struct: lconv
Functions: localeconv setlocale

The contents are the same as the Standard C library header <locale.h>.

Calls to the function setlocale may introduce a data race ([res.on.data.races]) with other calls to setlocale or with calls to the functions listed in Table [tab:setlocale.data.races].

Table 94 — Potential setlocale data races
fprintf isprint iswdigit localeconv tolower
fscanf ispunct iswgraph mblen toupper
isalnum isspace iswlower mbstowcs towlower
isalpha isupper iswprint mbtowc towupper
isblank iswalnum iswpunct setlocale wcscoll
iscntrl iswalpha iswspace strcoll wcstod
isdigit iswblank iswupper strerror wcstombs
isgraph iswcntrl iswxdigit strtod wcsxfrm
islower iswctype isxdigit strxfrm wctomb

See also: ISO C Clause 7.4.