minor changes

This commit is contained in:
Niels 2016-07-25 16:21:15 +02:00
parent d08e013dd0
commit a01ec918ac
3 changed files with 19 additions and 7 deletions

View file

@ -7386,12 +7386,18 @@ class basic_json
lexer operator=(const lexer&) = delete; lexer operator=(const lexer&) = delete;
/*! /*!
@brief create a string from a Unicode code point @brief create a string from one or two Unicode code points
There are two cases: (1) @a codepoint1 is in the Basic Multilingual
Plane (U+0000 through U+FFFF) and @a codepoint2 is 0, or (2)
@a codepoint1 and @a codepoint2 are a UTF-16 surrogate pair to
represent a code point above U+FFFF.
@param[in] codepoint1 the code point (can be high surrogate) @param[in] codepoint1 the code point (can be high surrogate)
@param[in] codepoint2 the code point (can be low surrogate or 0) @param[in] codepoint2 the code point (can be low surrogate or 0)
@return string representation of the code point @return string representation of the code point; the length of the
result string is between 1 and 4 characters.
@throw std::out_of_range if code point is > 0x10ffff; example: `"code @throw std::out_of_range if code point is > 0x10ffff; example: `"code
points above 0x10FFFF are invalid"` points above 0x10FFFF are invalid"`

View file

@ -7386,12 +7386,18 @@ class basic_json
lexer operator=(const lexer&) = delete; lexer operator=(const lexer&) = delete;
/*! /*!
@brief create a string from a Unicode code point @brief create a string from one or two Unicode code points
There are two cases: (1) @a codepoint1 is in the Basic Multilingual
Plane (U+0000 through U+FFFF) and @a codepoint2 is 0, or (2)
@a codepoint1 and @a codepoint2 are a UTF-16 surrogate pair to
represent a code point above U+FFFF.
@param[in] codepoint1 the code point (can be high surrogate) @param[in] codepoint1 the code point (can be high surrogate)
@param[in] codepoint2 the code point (can be low surrogate or 0) @param[in] codepoint2 the code point (can be low surrogate or 0)
@return string representation of the code point @return string representation of the code point; the length of the
result string is between 1 and 4 characters.
@throw std::out_of_range if code point is > 0x10ffff; example: `"code @throw std::out_of_range if code point is > 0x10ffff; example: `"code
points above 0x10FFFF are invalid"` points above 0x10FFFF are invalid"`

View file

@ -12299,7 +12299,7 @@ TEST_CASE("Unicode", "[hide]")
return ss.str(); return ss.str();
}; };
// generate all UTF8 code points; in total, 1112064 code points are // generate all UTF-8 code points; in total, 1112064 code points are
// generated: 0x1FFFFF code points - 2047 invalid values between // generated: 0x1FFFFF code points - 2047 invalid values between
// 0xD800 and 0xDFFF. // 0xD800 and 0xDFFF.
for (std::size_t cp = 0; cp <= 0x10FFFFu; ++cp) for (std::size_t cp = 0; cp <= 0x10FFFFu; ++cp)