123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <chapter xml:id="utf16.status.h">
- <title><tt>__vic/utf16/status.h</tt></title>
- <chapter xml:id="utf16--status">
- <title><tt>utf16::status</tt></title>
- <code-block lang="C++">
- enum class utf16::status
- {
- ok = 0,
- eof,
- // Errors
- truncated_code_unit,
- truncated_code_point,
- invalid_sequence
- };
- using utf16::status_t = utf16::status; // for C++98
- </code-block>
- <p>Values returned by <xref to="utf16--reader"/> <tt>parse()</tt> function.</p>
- <list style="bulleted">
- <item><tt>ok</tt> - code point successfully read</item>
- <item><tt>eof</tt> - no more code points to read</item>
- <item><tt>truncated_code_unit</tt> - incomplete code unit</item>
- <item><tt>truncated_code_point</tt> - incomplete code point</item>
- <item><tt>invalid_sequence</tt> - the bytes don't represent any valid
- UTF-16 code point</item>
- </list>
- </chapter>
- <chapter xml:id="utf16--is_error">
- <title><tt>utf16::is_error()</tt></title>
- <code-block lang="C++">
- constexpr bool utf16::is_error(utf16::status s);
- </code-block>
- <p>Returns <tt>false</tt> for <tt>utf16::status::ok</tt> and
- <tt>utf16::status::eof</tt> values. <tt>true</tt> is returned otherwise.</p>
- </chapter>
- <chapter xml:id="utf16--throw_if_error">
- <title><tt>utf16::throw_if_error()</tt></title>
- <code-block lang="C++">
- bool utf16::throw_if_error(utf16::status s);
- </code-block>
- <p>Throws exception from <xref to="utf16.exceptions.h"/> if
- <tt>is_error(s)</tt>. Returns <tt>true</tt> for <tt>utf16::status::ok</tt>
- or <tt>false</tt> for <tt>utf16::status::eof</tt>.</p>
- </chapter>
- </chapter>
|