msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Json Translation "
"(zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-06 13:59+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified Han script) <https://"
"insights.cppalliance.org/weblate/projects/boost-json-documentation-zh_Hans/"
"doc-pages-dom-numbers-adoc/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2026.5\n"

#: :12
#, safe-html, strict-same
msgid ""
"= Numbers JSON numbers are represented using `std::int64_t`, "
"`std::uint64_t`, and `double`. When a <<ref_value>> is constructed from an "
"unsigned integer, its <<ref_kind>> will be `kind::uint64`. Likewise, a "
"<<ref_value>> constructed from a signed integer will have `kind::int64`, or "
"`kind::double_` if constructed from a floating-point type:"
msgstr ""
"= 数字 JSON数字使用`std::int64_t`、`std::uint64_t`和`double`表示。当 "
"&lt;<ref_value>&gt; 从无符号整数构造时，其&lt;<ref_kind>&gt;将"
"为`kind::uint64`。同样，从有符号整数构造的&lt;<ref_value>&gt; 将具"
"有`kind::int64`，若从浮点类型构造则为`kind::double_`：</ref_value></ref_kind>"
"</ref_value>"

#: :24
#, safe-html, strict-same
msgid ""
"When accessing a number contained within a <<ref_value>>, the function used "
"must match the value's <<ref_kind>> exactly; no conversions will be "
"performed. For example if `as_double` is called on a <<ref_value>> that "
"contains a `std::uint64_t`, an exception is thrown. Similarly, the function "
"`if_double` will return `nullptr` and calling `get_double` will result in "
"undefined behavior:"
msgstr ""
"访问&lt;<ref_value>&gt;内包含的数字时，所使用的函数必须与该值的&lt;<ref_kind>"
"&gt;完全匹配；不会执行任何转换。例如，如果在一个包含`std::uint64_t` 的 "
"&lt;<ref_value>&gt; 上调用 `as_double`，将抛出异常。类似地，函数 `if_double` "
"将返回`nullptr`，而调用 `get_double` 将导致未定义行为：</ref_value></"
"ref_kind></ref_value>"

#: :36
#, safe-html, strict-same
msgid ""
"In cases where you know that a <<ref_value>> contains a number but don't "
"know its <<ref_kind>>, `value::to_number` can be used to convert the "
"<<ref_value>> to an arithmetic type:"
msgstr ""
"若已知 &lt;<ref_value>&gt; 包含数字，但不确定其 &lt;<ref_kind>&gt;，可使用 "
"`value::to_number` 将该&lt;<ref_value>&gt; 转换为算术类型：</ref_value></"
"ref_kind></ref_value>"

#: :45
#, safe-html, strict-same
msgid ""
"If the <<ref_value>> does not contain a number, or if the conversion is to "
"an integer type `T` and the number cannot be represented exactly by `T`, the "
"conversion will fail. Otherwise, the result is the number converted to `T` "
"as-if by `static_cast`:"
msgstr ""
"若&lt;<ref_value>&gt;不包含数字，或当转换目标为整数类型`T`且数字无法被`T`精确"
"表示时，将导致转换失败。否则，结果是通过`static_cast`将数字转换为`T`所得的值"
"：</ref_value>"

#: :55
#, safe-html, strict-same
msgid ""
"In settings where exceptions cannot be used, an overload of "
"`value::to_number` accepting {ref_error_code} can be used instead with "
"identical semantics to its throwing counterpart:"
msgstr ""
"在无法使用异常的场合，可改用接受{ref_error_code}的`value::to_number`重载，其"
"语义与抛出异常版本完全相同："

#: :64
#, safe-html, strict-same
msgid ""
"When parsing a JSON document, the type used to represent a number is not "
"explicitly specified and must be determined from its value. In general, the "
"parser will choose the best type which can accurately store the number as it "
"appears in the document. Integers (i.e. numbers without decimals or "
"exponents) that cannot be represented by `std::uint64_t` and `std::int64_t` "
"will be represented as `double` to preserve their magnitude:"
msgstr ""
"在解析 JSON 文档时，数字的表示类型并未显式指定，而必须根据其值来确定。通常，"
"解析器会选择能够精确存储文档中所出现数字的最佳类型。对于整数（即不带小数部分"
"或指数的数字），若其值无法用 `std::uint64_t` 或 `std::int64_t` 表示，则会以 "
"`double` 类型存储，以保留其数量级。"

#: :76
#, safe-html, strict-same
msgid "More formally, if the number:"
msgstr "更正式地，如果该数字："

#: :78
#, safe-html, strict-same
msgid "contains a decimal point, or"
msgstr "包含小数点，或"

#: :79
#, safe-html, strict-same
msgid "contains an exponent, or"
msgstr "包含指数，或"

#: :80
#, safe-html, strict-same
msgid "is negative and its value is less than `INT64_MIN`, or"
msgstr "为负数且其值小于`INT64_MIN`，或"

#: :81
#, safe-html, strict-same
msgid "is positive and its value is greater than `UINT64_MAX`,"
msgstr "为正数且其值大于`UINT64_MAX`，"

#: :83
#, safe-html, strict-same
msgid ""
"then its type is `double`. Otherwise, if the number is positive and its "
"value is greater than `INT64_MAX`, then its type is `std::uint64_t`. All "
"other numbers are parsed as `std::int64_t`."
msgstr ""
"则其类型为`double`。否则，若数字为正数且其值大于`INT64_MAX`，则其类型"
"为`std::uint64_t`。其余所有数字均被解析为`std::int64_t`。"
