Difference between revisions of "cpp/string/multibyte/mbstate t"
m (+sync) |
(+mention shift state) |
||
Line 7: | Line 7: | ||
The type mbstate_t is a trivial non-array type that can represent any of the conversion states that can occur in an implementation-defined set of supported multibyte character encoding rules. Zero-initialized value of {{tt|mbstate_t}} represents the initial conversion state, although other values of {{tt|mbstate_t}} may exist that also represent the initial conversion state. | The type mbstate_t is a trivial non-array type that can represent any of the conversion states that can occur in an implementation-defined set of supported multibyte character encoding rules. Zero-initialized value of {{tt|mbstate_t}} represents the initial conversion state, although other values of {{tt|mbstate_t}} may exist that also represent the initial conversion state. | ||
− | Possible implementation of {{tt|mbstate_t}} is a struct type holding an array representing the incomplete multibyte character | + | Possible implementation of {{tt|mbstate_t}} is a struct type holding an array representing the incomplete multibyte character, an integer counter indicating the number of bytes in the array that have been processed, and a representation of the current shift state. |
The following functions should not be called from multiple threads without synchronization with the {{cpp|std::mbstate_t*}} argument of {{tt|NULL}} due to possible data races: {{cpp|std::mbrlen}}, {{cpp|std::mbrtowc}}, {{cpp|std::mbsrtowc}}, {{cpp|std::mbtowc}}, {{cpp|std::wcrtomb}}, {{cpp|std::wcsrtomb}}, {{cpp|std::wctomb}}. | The following functions should not be called from multiple threads without synchronization with the {{cpp|std::mbstate_t*}} argument of {{tt|NULL}} due to possible data races: {{cpp|std::mbrlen}}, {{cpp|std::mbrtowc}}, {{cpp|std::mbsrtowc}}, {{cpp|std::mbtowc}}, {{cpp|std::wcrtomb}}, {{cpp|std::wcsrtomb}}, {{cpp|std::wctomb}}. |
Revision as of 17:47, 25 December 2011
Template:cpp/string/multibyte/sidebar
Defined in header <cwchar>
|
||
struct mbstate_t; |
||
The type mbstate_t is a trivial non-array type that can represent any of the conversion states that can occur in an implementation-defined set of supported multibyte character encoding rules. Zero-initialized value of mbstate_t
represents the initial conversion state, although other values of mbstate_t
may exist that also represent the initial conversion state.
Possible implementation of mbstate_t
is a struct type holding an array representing the incomplete multibyte character, an integer counter indicating the number of bytes in the array that have been processed, and a representation of the current shift state.
The following functions should not be called from multiple threads without synchronization with the Template:cpp argument of NULL
due to possible data races: Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp, Template:cpp.