Chinese (Simplified Han script) (Boost Json Translation - en to zh_Hans translation catalogue (8 entries)

en: = Non-Throwing Conversions For the case where throwing exceptions is undesirable, Boost.JSON also provides a non-throwing version of <<ref_value_to>>, the function template <<ref_try_value_to>>.  It returns {ref_result}, a specialised variant that either holds a value or an {ref_error_code}.
zh_Hans: = 不抛异常的转换 对于不希望抛出异常的场景，Boost.JSON 还提供了 &lt;<ref_value_to>&gt; 的不抛异常版本，即函数模板 &lt;<ref_try_value_to>&gt;。它返回 {ref_result}，这是一个特化的变体类型，要么持有转换得到的值，要么持有 {ref_error_code}。</ref_try_value_to></ref_value_to>

en: There's no non-throwing equivalent for <<ref_value_from>>. This is simply because we haven't yet encountered a situation where <<ref_value_from>> needed to communicate an error to the caller.
zh_Hans: 对于 &lt;<ref_value_from>&gt;; 没有对应的不抛异常版本。这仅仅是因为我们尚未遇到需要 &lt;<ref_value_from>&gt; 向调用者报告错误的情况。</ref_value_from></ref_value_from>

en: The library provides non-throwing conversions for all the categories of types it supports with <<ref_value_to>>. If a user wants to use it with custom types, an overload of `tag_invoke` of this form needs to be provided:
zh_Hans: 该库为 &lt;<ref_value_to>&gt; 所支持的所有类型类别均提供了不抛异常的转换。如果用户希望将其用于自定义类型，则需要提供如下形式的 `tag_invoke` 重载：</ref_value_to>

en: ``` result_for<T, value>::type tag_invoke( const try_value_to_tag< T >&, const value& ); ```
zh_Hans: ``` result_for<t, value="">::type tag_invoke( const try_value_to_tag&lt; T &gt;&amp;, const value&amp; ); ```</t,>

en: For the class `ip_address` from the section <<custom_conversions>> this overload may look like this:
zh_Hans: 对于 &lt;<custom_conversions>&gt; 节中所述的 `ip_address` 类，该重载可能如下所示：</custom_conversions>

en: The overload lets us use `ip_address` with <<ref_try_value_to>>.
zh_Hans: 该重载使我们能够将 `ip_address` 与 &lt;<ref_try_value_to>&gt; 一起使用。</ref_try_value_to>

en: If <<ref_try_value_to>> is used with a type, for which there's no `tag_invoke` overload of the form described in this section, but there is one of the form intended for <<ref_value_to>>, then the library still tries to perform the conversion. It uses the throwing overload, and attempts to convert any thrown exception into an {ref_error_code}. Note, though, that such approach will likely be slower then a dedicated overload.
zh_Hans: 如果将 &lt;<ref_try_value_to>&gt; 与某种类型搭配使用，而该类型不存在本节中所描述的这种形式的 `tag_invoke` 重载函数，但存在用于 &lt;<ref_value_to>&gt; 形式的那种重载函数，那么库仍会尝试进行转换。它会使用抛出异常的重载函数，并尝试将任何抛出的异常转换为 {ref_error_code}。不过需要注意的是，这种方式可能比专门的重载函数要慢一些。</ref_value_to></ref_try_value_to>

en: The opposite is also true: if there's a `tag_invoke` overload intended for <<ref_try_value_to>>, but not for <<ref_value_to>>, then calling <<ref_value_to>> will invoke the non-throwing overload, then construct a {ref_system_error} from the {ref_error_code} and throw it. Due to these fallbacks, it is recommended that users provide the overload from this section, rather then the other one, if they ever intend to use <<ref_try_value_to>>.
zh_Hans: 反之亦然：如果存在适用于&lt;<ref_try_value_to>&gt; 的 tag_invoke 重载，但没有适用于 &lt;<ref_value_to>&gt; 的重载，那么调用 &lt;<ref_value_to>&gt; 时会转而调用不抛异常的重载，随后根据返回的 {ref_error_code} 构造一个 {ref_system_error} 并抛出。由于存在上述回退机制，建议用户在计划使用 &lt;<ref_try_value_to>&gt; 时，优先提供本节所述的不抛异常重载，而非抛异常的重载。</ref_try_value_to></ref_value_to></ref_value_to></ref_try_value_to>
