<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1">
  <file original="NoName" source-language="en" datatype="plaintext" target-language="zh_Hans">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="f86e8f941b7650e0" weblate-flags="safe-html, strict-same">
        <source>= Non-Throwing Conversions For the case where throwing exceptions is undesirable, Boost.JSON also provides a non-throwing version of &lt;&lt;ref_value_to&gt;&gt;, the function template &lt;&lt;ref_try_value_to&gt;&gt;.  It returns {ref_result}, a specialised variant that either holds a value or an {ref_error_code}.</source>
        <target state="translated">= 不抛异常的转换 对于不希望抛出异常的场景，Boost.JSON 还提供了 &amp;lt;&lt;ref_value_to&gt;&amp;gt; 的不抛异常版本，即函数模板 &amp;lt;&lt;ref_try_value_to&gt;&amp;gt;。它返回 {ref_result}，这是一个特化的变体类型，要么持有转换得到的值，要么持有 {ref_error_code}。&lt;/ref_try_value_to&gt;&lt;/ref_value_to&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">10</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ef71baad973da898" weblate-flags="safe-html, strict-same">
        <source>There's no non-throwing equivalent for &lt;&lt;ref_value_from&gt;&gt;. This is simply because we haven't yet encountered a situation where &lt;&lt;ref_value_from&gt;&gt; needed to communicate an error to the caller.</source>
        <target state="translated">对于 &amp;lt;&lt;ref_value_from&gt;&amp;gt;; 没有对应的不抛异常版本。这仅仅是因为我们尚未遇到需要 &amp;lt;&lt;ref_value_from&gt;&amp;gt; 向调用者报告错误的情况。&lt;/ref_value_from&gt;&lt;/ref_value_from&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">17</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="44f89ef4767a10a7" weblate-flags="safe-html, strict-same">
        <source>The library provides non-throwing conversions for all the categories of types it supports with &lt;&lt;ref_value_to&gt;&gt;. If a user wants to use it with custom types, an overload of `tag_invoke` of this form needs to be provided:</source>
        <target state="translated">该库为 &amp;lt;&lt;ref_value_to&gt;&amp;gt; 所支持的所有类型类别均提供了不抛异常的转换。如果用户希望将其用于自定义类型，则需要提供如下形式的 `tag_invoke` 重载：&lt;/ref_value_to&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">21</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="987a5ad46e3b5f4b" weblate-flags="safe-html, strict-same">
        <source>``` result_for&lt;T, value&gt;::type tag_invoke( const try_value_to_tag&lt; T &gt;&amp;, const value&amp; ); ```</source>
        <target state="translated">``` result_for&lt;t, value=""&gt;::type tag_invoke( const try_value_to_tag&amp;lt; T &amp;gt;&amp;amp;, const value&amp;amp; ); ```&lt;/t,&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">25</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="9f2096e2f0e636b5" weblate-flags="safe-html, strict-same">
        <source>For the class `ip_address` from the section &lt;&lt;custom_conversions&gt;&gt; this overload may look like this:</source>
        <target state="translated">对于 &amp;lt;&lt;custom_conversions&gt;&amp;gt; 节中所述的 `ip_address` 类，该重载可能如下所示：&lt;/custom_conversions&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">30</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bb814b0bb73ccbf7" weblate-flags="safe-html, strict-same">
        <source>The overload lets us use `ip_address` with &lt;&lt;ref_try_value_to&gt;&gt;.</source>
        <target state="translated">该重载使我们能够将 `ip_address` 与 &amp;lt;&lt;ref_try_value_to&gt;&amp;gt; 一起使用。&lt;/ref_try_value_to&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">38</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e12c6f4785802e51" weblate-flags="safe-html, strict-same">
        <source>If &lt;&lt;ref_try_value_to&gt;&gt; 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 &lt;&lt;ref_value_to&gt;&gt;, 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.</source>
        <target state="translated">如果将 &amp;lt;&lt;ref_try_value_to&gt;&amp;gt; 与某种类型搭配使用，而该类型不存在本节中所描述的这种形式的 `tag_invoke` 重载函数，但存在用于 &amp;lt;&lt;ref_value_to&gt;&amp;gt; 形式的那种重载函数，那么库仍会尝试进行转换。它会使用抛出异常的重载函数，并尝试将任何抛出的异常转换为 {ref_error_code}。不过需要注意的是，这种方式可能比专门的重载函数要慢一些。&lt;/ref_value_to&gt;&lt;/ref_try_value_to&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">45</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3fa9f4eba8b2651b" weblate-flags="safe-html, strict-same">
        <source>The opposite is also true: if there's a `tag_invoke` overload intended for &lt;&lt;ref_try_value_to&gt;&gt;, but not for &lt;&lt;ref_value_to&gt;&gt;, then calling &lt;&lt;ref_value_to&gt;&gt; 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 &lt;&lt;ref_try_value_to&gt;&gt;.</source>
        <target state="translated">反之亦然：如果存在适用于&amp;lt;&lt;ref_try_value_to&gt;&amp;gt; 的 tag_invoke 重载，但没有适用于 &amp;lt;&lt;ref_value_to&gt;&amp;gt; 的重载，那么调用 &amp;lt;&lt;ref_value_to&gt;&amp;gt; 时会转而调用不抛异常的重载，随后根据返回的 {ref_error_code} 构造一个 {ref_system_error} 并抛出。由于存在上述回退机制，建议用户在计划使用 &amp;lt;&lt;ref_try_value_to&gt;&amp;gt; 时，优先提供本节所述的不抛异常重载，而非抛异常的重载。&lt;/ref_try_value_to&gt;&lt;/ref_value_to&gt;&lt;/ref_value_to&gt;&lt;/ref_try_value_to&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">52</context>
        </context-group>
      </trans-unit>
    </body>
  </file>
</xliff>
