<?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="67721bc9583e2ecd" weblate-flags="safe-html, strict-same">
        <source>= `storage_ptr` Variable-length containers in this library all use dynamically allocated memory to store their contents. Callers can gain control over the strategy used for allocation by specifying a &lt;&lt;ref_storage_ptr&gt;&gt; in select constructors and function parameter lists. A &lt;&lt;ref_storage_ptr&gt;&gt; has these properties:</source>
        <target state="translated">= `storage_ptr` 本库中的可变长度容器均使用动态分配的内存来存储其内容。调用方可通过在特定构造函数和函数参数列表中指定 &amp;lt;&lt;ref_storage_ptr&gt;&amp;gt; ，以控制所使用的内存分配策略。&amp;lt;&lt;ref_storage_ptr&gt;&amp;gt; 具有以下特性：&lt;/ref_storage_ptr&gt;&lt;/ref_storage_ptr&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">11</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="74afa41fef2be3de" weblate-flags="safe-html, strict-same">
        <source>A storage pointer always points to a valid,</source>
        <target state="translated">存储指针始终指向一个有效的、</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="8b4b4b62cef57a74" weblate-flags="safe-html, strict-same">
        <source>type-erased {ref_memory_resource}.</source>
        <target state="translated">类型擦除后的 {ref_memory_resource}。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">18</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2d550b907e4efc94" weblate-flags="safe-html, strict-same">
        <source>Default-constructed storage pointers reference the</source>
        <target state="translated">默认构造的存储指针引用</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">20</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8325316d33e98c1c" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;default_memory_resource,default resource&gt;&gt;, an implementation-defined instance which always uses the equivalent of global operator new and delete.</source>
        <target state="translated">&amp;lt;&lt;default_memory_resource,default resource=""&gt;&amp;gt;（默认资源），这是一个由实现定义的实例，始终使用等效于全局 operator new 和 operator delete 的方式。&lt;/default_memory_resource,default&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="42941284383a7277" weblate-flags="safe-html, strict-same">
        <source>Storage pointers constructed from a {ref_memory_resource} or</source>
        <target state="translated">从 {ref_memory_resource} 构造的存储指针，或</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">24</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4ab12e68ba291852" weblate-flags="safe-html, strict-same">
        <source>{ref_polymorphic_allocator} do not acquire ownership; the caller is responsible for ensuring that the lifetime of the resource extends until it is no longer referenced.</source>
        <target state="translated">从 {ref_polymorphic_allocator} 构造的存储指针，不获取所有权；调用方负责确保资源的生命周期持续到不再被引用为止。</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="968383126cf25a3c" weblate-flags="safe-html, strict-same">
        <source>A storage pointer obtained from &lt;&lt;ref_make_shared_resource&gt;&gt; acquires shared</source>
        <target state="translated">通过 &amp;lt;&lt;ref_make_shared_resource&gt;&amp;gt; 获取的存储指针会获得&lt;/ref_make_shared_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">29</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2b4fe5ba0b026bdc" weblate-flags="safe-html, strict-same">
        <source>ownership of the memory resource; the lifetime of the resource is extended until all copies of the storage pointer are destroyed.</source>
        <target state="translated">对内存资源的共享所有权；该资源的生命周期将延长，直至所有该存储指针的副本均被销毁。</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="ee5f7e7375990ed9" weblate-flags="safe-html, strict-same">
        <source>The storage pointer remembers the value of &lt;&lt;ref_is_deallocate_trivial&gt;&gt;</source>
        <target state="translated">存储指针会记录 &amp;lt;&lt;ref_is_deallocate_trivial&gt;&amp;gt; 的值，&lt;/ref_is_deallocate_trivial&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">33</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f8d7c8c35ae14001" weblate-flags="safe-html, strict-same">
        <source>before type-erasing the resource, allowing the value to be queried at run-time.</source>
        <target state="translated">（&lt;&gt; 值的记录是）在对资源进行类型擦除之前进行的,从而允许在运行时查询该值。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">34</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6d459724353d32b2" weblate-flags="safe-html, strict-same">
        <source>This lists all of the allocation-related types and functions available when using the library:</source>
        <target state="translated">此列表列出了在使用该库时可用的所有与分配相关的类型和函数：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">37</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b4c4db868dbf643a" weblate-flags="safe-html, strict-same">
        <source>Name</source>
        <target state="translated">Name</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">41</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f7f5c115cf553484" weblate-flags="safe-html, strict-same">
        <source>Description</source>
        <target state="translated">描述</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">41</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="9c860700408cfc35" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;ref_get_null_resource&gt;&gt;</source>
        <target state="translated">&amp;lt;&amp;gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">41</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2546b455897294da" weblate-flags="safe-html, strict-same">
        <source>Returns a pointer to a memory resource instance which always throws an</source>
        <target state="translated">返回一个指向内存资源实例的指针，该实例总是在</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">41</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ae1c7715dbaf258a" weblate-flags="safe-html, strict-same">
        <source>exception upon allocation. This is used to to achieve the invariant that no parsing or container operation will dynamically allocate memory.</source>
        <target state="translated">分配内存时抛出异常。此机制用于确保解析或容器操作不会进行动态内存分配，从而维持该不变性。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">46</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c2e1a2cc6a23293a" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;ref_is_deallocate_trivial&gt;&gt;</source>
        <target state="translated">&amp;lt;&lt;ref_is_deallocate_trivial&gt;&amp;gt;&lt;/ref_is_deallocate_trivial&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">49</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bdcf1e58d1bcca3c" weblate-flags="safe-html, strict-same">
        <source>A customization point allowing a memory resource type to indicate that calls</source>
        <target state="translated">一个自定义点，允许内存资源类型表明其</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">49</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3d9ac427dceae3fc" weblate-flags="safe-html, strict-same">
        <source>to deallocate are trivial.</source>
        <target state="translated">deallocate 的调用是平凡的。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">51</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8761e3b936064803" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;ref_make_shared_resource&gt;&gt;</source>
        <target state="translated">&amp;lt;&lt;ref_make_shared_resource&gt;&amp;gt;&lt;/ref_make_shared_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">53</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="713dd9c42999db8f" weblate-flags="safe-html, strict-same">
        <source>A function returning a smart pointer with shared ownership of a newly</source>
        <target state="translated">一个返回智能指针的函数，该智能指针对新</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">53</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="317febcc43b055f8" weblate-flags="safe-html, strict-same">
        <source>allocated memory resource.</source>
        <target state="translated">分配的内存资源具有共享所有权。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">55</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0062cdd7521077d5" weblate-flags="safe-html, strict-same">
        <source>{ref_memory_resource}</source>
        <target state="translated">{ref_memory_resource}</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">57</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="afebb1c461b61d0a" weblate-flags="safe-html, strict-same">
        <source>The abstract base class representing an allocator.</source>
        <target state="translated">表示分配器的抽象基类。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">57</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c7be91f7b1ec2d7f" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;ref_monotonic_resource&gt;&gt;</source>
        <target state="translated">&amp;lt;&lt;ref_monotonic_resource&gt;&amp;gt;&lt;/ref_monotonic_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">57</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3cc5309f9e8341fa" weblate-flags="safe-html, strict-same">
        <source>A memory resource which allocates large blocks of memory and has a trivial</source>
        <target state="translated">一种内存资源，用于分配大块内存，且该资源具有平凡的</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">57</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a29f626a4c118c32" weblate-flags="safe-html, strict-same">
        <source>deallocate function. Allocated memory is not freed until the resource is destroyed, making it fast for parsing but not suited for performing modifications.</source>
        <target state="translated">deallocate 函数。所分配的内存不会被释放，直到该资源被销毁，因此在解析场景下速度很快，但不适合执行修改操作。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">62</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="95e3eeeb7826ac2c" weblate-flags="safe-html, strict-same">
        <source>{ref_polymorphic_allocator}</source>
        <target state="translated">{ref_polymorphic_allocator}</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">66</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ad9bd360f0159ad5" weblate-flags="safe-html, strict-same">
        <source>An {req_Allocator} which uses a reference to a {ref_memory_resource} to</source>
        <target state="translated">一个 {req_Allocator}，它通过引用 {ref_memory_resource}</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">66</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="da671c610bc8bf82" weblate-flags="safe-html, strict-same">
        <source>perform allocations.</source>
        <target state="translated">执行内存分配。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">68</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="300d38ae4c94cf9a" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;ref_static_resource&gt;&gt;</source>
        <target state="translated">&amp;lt;&lt;ref_static_resource&gt;&amp;gt;&lt;/ref_static_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">70</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c4d0d01edc852220" weblate-flags="safe-html, strict-same">
        <source>A memory resource that uses a single caller provided buffer. No dynamic</source>
        <target state="translated">一种使用调用方提供的单一缓冲区的内存资源，不进行任何动态</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">70</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="08de41953e08e4d4" weblate-flags="safe-html, strict-same">
        <source>allocations are used. This is fast for parsing but not suited for performing modifications.</source>
        <target state="translated">分配。该资源在解析时速度很快，但不适合执行修改操作。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">72</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ac80dde53251acb1" weblate-flags="safe-html, strict-same">
        <source>&lt;&lt;ref_storage_ptr&gt;&gt;</source>
        <target state="translated">&amp;lt;&lt;ref_storage_ptr&gt;&amp;gt;&lt;/ref_storage_ptr&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">75</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="029f149e02905f1c" weblate-flags="safe-html, strict-same">
        <source>A smart pointer through which a {ref_memory_resource} is managed and</source>
        <target state="translated">A smart pointer through which a {ref_memory_resource} is managed and</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">75</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="20ee1f97469fe46c" weblate-flags="safe-html, strict-same">
        <source>accessed. |===</source>
        <target state="translated">访问. |===</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">77</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="83ba2c0d9ece21f4" weblate-flags="safe-html, strict-same">
        <source>Default Memory Resource</source>
        <target state="translated">默认内存资源</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">80</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="528b6efe8edd7699" weblate-flags="safe-html, strict-same">
        <source>The default memory resource uses the global `operator new` and `operator delete` to allocate memory. This resource is not reference counted and has a non-trivial deallocate function. All default-constructed &lt;&lt;ref_storage_ptr&gt;&gt; objects reference the same memory resource:</source>
        <target state="translated">默认内存资源使用全局 `operator new` 和 `operator delete` 来进行内存分配。该资源不采用引用计数，且其 deallocate 函数是非平凡的。所有默认构造的 &amp;lt;&lt;ref_storage_ptr&gt;&amp;gt; 对象均引用同一个内存资源：&lt;/ref_storage_ptr&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">81</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c40f58e2885275ac" weblate-flags="safe-html, strict-same">
        <source>Default-constructed library containers use the default memory resource:</source>
        <target state="translated">默认构造的库容器使用默认内存资源：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">91</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b7db9f80042cd561" weblate-flags="safe-html, strict-same">
        <source>The default memory resource is well suited for general usage. It offers reasonable performance for parsing, and conservative memory usage for modification of the contents of containers.</source>
        <target state="translated">默认内存资源适用于一般用途。它在解析时提供合理的性能，在修改容器内容时则具有保守的内存使用特性。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">98</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="91f838a9bd7c56da" weblate-flags="safe-html, strict-same">
        <source>This memory resource is not guaranteed to be the same as the result of `boost::container::pmr::get_default_resource`. It also cannot be changed with `boost::container::pmr::set_default_resource`.</source>
        <target state="translated">该内存资源不保证与 `boost::container::pmr::get_default_resource` 的返回结果相同，也无法通过 `boost::container::pmr::set_default_resource` 进行更改。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">103</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c843bed65412cb9a" weblate-flags="safe-html, strict-same">
        <source>Monotonic Resource</source>
        <target state="translated">单调资源</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">107</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8e839e6171d247fd" weblate-flags="safe-html, strict-same">
        <source>Consider the pattern of memory allocation during parsing: when an array, object, or string is encountered the parser accumulates elements in its temporary storage area. When all of the elements are known, a single memory allocation is requested from the resource when constructing the value. Thus, parsing only allocates and constructs containers at their final size. Memory is not reallocated; that is, a memory buffer never needs to grow by allocating a new larger buffer and deallocating the previous buffer.</source>
        <target state="translated">考虑解析过程中的内存分配模式：当遇到数组、对象或字符串时，解析器会将其元素累积在临时存储区中。当所有元素都已知后，在构造值时会向内存资源发起一次内存分配请求。因此，解析过程仅在容器最终大小确定时进行一次分配和构造，不会发生内存重分配；也就是说，内存缓冲区无需通过分配更大的新缓冲区并释放旧缓冲区的方式来扩容。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">108</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="643789f79669ee7b" weblate-flags="safe-html, strict-same">
        <source>The &lt;&lt;ref_monotonic_resource&gt;&gt; optimizes this memory allocation pattern by allocating increasingly large blocks of global memory internally and parceling those blocks out in smaller pieces to fulfill allocation requests. It has a trivial deallocate function. The monotonic resource does not actually deallocate memory until the resource is destroyed. Thus, it is ideally suited for the use-case where JSON is parsed, and the resulting value is then inspected but not modified.</source>
        <target state="translated">&amp;lt;&lt;ref_monotonic_resource&gt;&amp;gt; 通过在内部分配逐渐增大的全局内存块，并将这些块切分为更小的部分以满足分配请求，从而优化了该内存分配模式。它具有平凡的 deallocate 函数，实际上不会释放内存，直到该资源被销毁。因此，它非常适合用于解析 JSON 后仅检查结果值而不对其进行修改的场景。&lt;/ref_monotonic_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">116</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5b9c79269ea4c01c" weblate-flags="safe-html, strict-same">
        <source>The resource to use when constructing values may be specified in calls to &lt;&lt;ref_parse&gt;&gt; as shown here:</source>
        <target state="translated">在调用 &amp;lt;&lt;ref_parse&gt;&amp;gt; 时，可按如下方式指定构造值所使用的内存资源：&lt;/ref_parse&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">124</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e922f0a195b9abc9" weblate-flags="safe-html, strict-same">
        <source>Or, to parse into a value with shared ownership of the memory resource:</source>
        <target state="translated">或者，可按如下方式解析到一个对内存资源具有共享所有权的值：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">132</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c2a40934acf0e8cd" weblate-flags="safe-html, strict-same">
        <source>A monotonic resource may be optionally constructed with an initial buffer to use first, before going to the heap. This allows the caller to use stack space and avoid dynamic allocations for most parsed JSON, falling back to dynamic allocation from the heap if the input JSON is larger than average, as shown here:</source>
        <target state="translated">单调资源在构造时可选择性地指定一个初始缓冲区，优先使用该缓冲区，之后才会转而使用堆内存。这使得调用方可以利用栈空间，避免对大多数 JSON 解析进行动态分配；仅当输入的 JSON 大于平均水平时，才会退回到从堆中进行动态分配，如下所示：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">139</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="56fb6814fae27508" weblate-flags="safe-html, strict-same">
        <source>Static Resource</source>
        <target state="translated">静态资源</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">150</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ff6fa170fed30f42" weblate-flags="safe-html, strict-same">
        <source>A &lt;&lt;ref_static_resource&gt;&gt; constructs from a caller-provided buffer, and satisfies all memory allocation requests from the buffer. Once the buffer is exhausted, subsequent calls to allocate throw the exception `std::bad_alloc`. The resource offers a simple invariant: dynamic heap allocations are never performed.</source>
        <target state="translated">&amp;lt;&lt;ref_static_resource&gt;&amp;gt; 由调用方提供的缓冲区构造而成，并从该缓冲区满足所有内存分配请求。一旦缓冲区耗尽，后续的分配调用将抛出 `std::bad_alloc` 异常。该资源提供一个简单的不变式：永不执行动态堆分配。&lt;/ref_static_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">151</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d5e3f89d5e85a70d" weblate-flags="safe-html, strict-same">
        <source>To use the resource, construct it with a local buffer:</source>
        <target state="translated">要使用该资源，请用一个局部缓冲区对其进行构造：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">157</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="02efb0b4ac4c2173" weblate-flags="safe-html, strict-same">
        <source>Null Resource</source>
        <target state="translated">空资源</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">164</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5b29d67b8dfb5fe9" weblate-flags="safe-html, strict-same">
        <source>The function &lt;&lt;ref_get_null_resource&gt;&gt; returns a global instance of the null resource. This resource offers a simple invariant: all calls to allocate will throw the exception `std::bad_alloc`. An instance of the null resource can be used to make parsing guarantee that allocations from the heap are never made. This is explored in more detail in a later section.</source>
        <target state="translated">函数 &amp;lt;&lt;ref_get_null_resource&gt;&amp;gt; 返回一个全局的空资源实例。该资源提供一个简单的不变式：所有内存分配调用都会抛出 `std::bad_alloc` 异常。通过使用空资源实例，可确保解析过程绝不会进行堆内存分配。这一点将在后文进一步详细说明。&lt;/ref_get_null_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">165</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="be805c67af6654dd" weblate-flags="safe-html, strict-same">
        <source>Allocator Propagation</source>
        <target state="translated">分配器传播</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">171</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="557eb8710bfdb47a" weblate-flags="safe-html, strict-same">
        <source>The containers &lt;&lt;ref_array&gt;&gt;, &lt;&lt;ref_object&gt;&gt;, and &lt;&lt;ref_value&gt;&gt; all propagate the memory resource they were constructed with to child elements:</source>
        <target state="translated">容器 &amp;lt;&lt;ref_array&gt;&amp;gt;, &amp;lt;&lt;ref_object&gt;&amp;gt; 和 &amp;lt;&lt;ref_value&gt;&amp;gt; 在构造时所使用的内存资源会自动传播给其子元素：&lt;/ref_value&gt;&lt;/ref_object&gt;&lt;/ref_array&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">172</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1c5f22b06a932409" weblate-flags="safe-html, strict-same">
        <source>This propagation acts recursively, containers within containers will all have the resource propagated. Once a container is constructed, its memory resource can never be changed.</source>
        <target state="translated">这种传播是递归进行的：嵌套容器中的所有子容器都会获得相同的内存资源。一旦容器被构造，其内存资源就永远无法更改。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">180</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4835d6a453f38366" weblate-flags="safe-html, strict-same">
        <source>Resource Lifetime</source>
        <target state="translated">资源生命周期</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">184</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8891c83b267ca41f" weblate-flags="safe-html, strict-same">
        <source>It is important to note that &lt;&lt;ref_storage_ptr&gt;&gt; supports both shared-ownership and reference lifetime models. Construction from a memory resource pointer does not transfer ownership:</source>
        <target state="translated">需要注意的是，&amp;lt;&lt;ref_storage_ptr&gt;&amp;gt; 同时支持共享所有权和引用生命周期模型。从内存资源指针构造时不会转移所有权：&lt;/ref_storage_ptr&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">185</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0990beca0de18144" weblate-flags="safe-html, strict-same">
        <source>When using a memory resource in this fashion, including the case where a storage pointer or container is constructed from a {ref_polymorphic_allocator}, the caller must ensure that the lifetime of the resource is extended until it is no longer referenced by any variables; otherwise, undefined behavior is possible.</source>
        <target state="translated">以这种方式使用内存资源时（包括从 {ref_polymorphic_allocator} 构造存储指针或容器的情况），调用方必须确保资源的生命周期延长至不再被任何变量引用为止；否则，可能会出现未定义行为。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">194</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="207d765a6c5a7d61" weblate-flags="safe-html, strict-same">
        <source>Shared ownership is achieved using the function &lt;&lt;ref_make_shared_resource&gt;&gt;, which creates a new, reference-counted memory resource using a dynamic memory allocation and returns it as a &lt;&lt;ref_storage_ptr&gt;&gt;:</source>
        <target state="translated">通过函数 &amp;lt;&lt;ref_make_shared_resource&gt;&amp;gt; 可实现共享所有权，该函数会动态分配内存以创建一个新的、带引用计数的内存资源，并将其以 &amp;lt;&lt;ref_storage_ptr&gt;&amp;gt; 的形式返回：&lt;/ref_storage_ptr&gt;&lt;/ref_make_shared_resource&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">200</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="dd00ca00b26f0c57" weblate-flags="safe-html, strict-same">
        <source>When a storage pointer is constructed this way, the lifetime of the referenced memory resource is extended until all variables which reference it are destroyed.</source>
        <target state="translated">当存储指针以这种方式构造时，其所引用的内存资源的生命周期将延长，直至所有引用它的变量均被销毁为止。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">209</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bf105e1572a01940" weblate-flags="safe-html, strict-same">
        <source>User-Defined Resource</source>
        <target state="translated">用户定义资源</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">213</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8a5b62fcea34b53e" weblate-flags="safe-html, strict-same">
        <source>To implement custom memory allocation strategies, derive your class from {ref_memory_resource} and implement the functions `do_allocate`, `do_deallocate`, and `do_is_equal` as seen in this example below, which logs each operation it performs to the console:</source>
        <target state="translated">要实现自定义内存分配策略，请从 {ref_memory_resource} 派生类，并实现函数 `do_allocate`、`do_deallocate` 和 `do_is_equal`，如下例所示，该示例将其执行的每个操作记录到控制台：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">214</context>
        </context-group>
      </trans-unit>
    </body>
  </file>
</xliff>
