<?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="en">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="db7e3a3014c7f075" weblate-flags="read-only, safe-html, strict-same">
        <source>= Custom Conversions Boost.JSON uses two mechanisms to customize conversion between &lt;&lt;ref_value&gt;&gt; and user types. One mechanism involves specializing type traits. The other one is more powerful and requires defining overloads of `tag_invoke`. Both mechanisms will be further explained in this section.</source>
        <target state="translated">= Custom Conversions Boost.JSON uses two mechanisms to customize conversion between &lt;&lt;ref_value&gt;&gt; and user types. One mechanism involves specializing type traits. The other one is more powerful and requires defining overloads of `tag_invoke`. Both mechanisms will be further explained in this section.</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="29df1a0d51cdb284" weblate-flags="read-only, safe-html, strict-same">
        <source>Conversion Traits</source>
        <target state="translated">Conversion Traits</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">16</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ee8bd190809448d3" weblate-flags="read-only, safe-html, strict-same">
        <source>Previously a number of conversion type traits, like &lt;&lt;ref_is_tuple_like&gt;&gt; or &lt;&lt;ref_is_sequence_like&gt;&gt;,  were introduced. The library tries the traits one after another and uses the implementation that corresponds to the first matching trait. In some cases, though, a type would match a trait with a higher priority, but the user intends for it to belong to a lower priority category. If this happens the user can specialize the trait that's not supposed to match for that type to be an equivalent of `std::false_type`.</source>
        <target state="translated">Previously a number of conversion type traits, like &lt;&lt;ref_is_tuple_like&gt;&gt; or &lt;&lt;ref_is_sequence_like&gt;&gt;,  were introduced. The library tries the traits one after another and uses the implementation that corresponds to the first matching trait. In some cases, though, a type would match a trait with a higher priority, but the user intends for it to belong to a lower priority category. If this happens the user can specialize the trait that's not supposed to match for that type to be an equivalent of `std::false_type`.</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="5057dd0f035191da" weblate-flags="read-only, safe-html, strict-same">
        <source>Consider this type:</source>
        <target state="translated">Consider this type:</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="af31edd89e4546e9" weblate-flags="read-only, safe-html, strict-same">
        <source>It exposes both a sequence API and a tuple API. But converting from &lt;&lt;ref_value&gt;&gt; to `user_ns::ip_address` would not be able to use implementation for sequences, since those are constructed empty and then populated one element at a time, while `ip_address` has a fixed size of 4. The tuple conversion would fit, though. The only problem is that &lt;&lt;ref_is_tuple_like&gt;&gt; has a lower priority than &lt;&lt;ref_is_sequence_like&gt;&gt;. In order to circumvent this, the user only needs to specialize &lt;&lt;ref_is_sequence_like&gt;&gt; to not match `ip_address`.</source>
        <target state="translated">It exposes both a sequence API and a tuple API. But converting from &lt;&lt;ref_value&gt;&gt; to `user_ns::ip_address` would not be able to use implementation for sequences, since those are constructed empty and then populated one element at a time, while `ip_address` has a fixed size of 4. The tuple conversion would fit, though. The only problem is that &lt;&lt;ref_is_tuple_like&gt;&gt; has a lower priority than &lt;&lt;ref_is_sequence_like&gt;&gt;. In order to circumvent this, the user only needs to specialize &lt;&lt;ref_is_sequence_like&gt;&gt; to not match `ip_address`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">32</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ca3736f607b05d90" weblate-flags="read-only, safe-html, strict-same">
        <source>`tag_invoke` Overloads</source>
        <target state="translated">`tag_invoke` Overloads</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="bae52da73639ec2e" weblate-flags="read-only, safe-html, strict-same">
        <source>The second, more powerful approach, is to provide the conversion implementation yourself. With Boost.JSON this is done by defining an overload of `tag_invoke` function (the benefits of this mechanism are outlined in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf[C++ proposal P1895]. In essence, `tag_invoke` provides a uniform interface for defining customization points by using argument-dependent lookup to find a viable overload from the point at which it is called. As the name suggests, a tag type is passed as an argument in order to:</source>
        <target state="translated">The second, more powerful approach, is to provide the conversion implementation yourself. With Boost.JSON this is done by defining an overload of `tag_invoke` function (the benefits of this mechanism are outlined in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1895r0.pdf[C++ proposal P1895]. In essence, `tag_invoke` provides a uniform interface for defining customization points by using argument-dependent lookup to find a viable overload from the point at which it is called. As the name suggests, a tag type is passed as an argument in order to:</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="fcd16e41abefe5d9" weblate-flags="read-only, safe-html, strict-same">
        <source>discard candidates that are unrelated to that particular</source>
        <target state="translated">discard candidates that are unrelated to that particular</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="2e09de43c2ca9b1c" weblate-flags="read-only, safe-html, strict-same">
        <source>customization point, and</source>
        <target state="translated">customization point, and</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">56</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0000c8df510ab6a4" weblate-flags="read-only, safe-html, strict-same">
        <source>embed the user-defined type into the arguments list (e.g. by using a tag type</source>
        <target state="translated">embed the user-defined type into the arguments list (e.g. by using a tag type</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">58</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="032f7b87fa7e46c8" weblate-flags="read-only, safe-html, strict-same">
        <source>template such as `value_to_tag&lt;T&gt;`) so that its http://eel.is/c++draft/basic.lookup.argdep#2[associated namespaces and entities] are examined when name lookup is performed.</source>
        <target state="translated">template such as `value_to_tag&lt;T&gt;`) so that its http://eel.is/c++draft/basic.lookup.argdep#2[associated namespaces and entities] are examined when name lookup is performed.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">59</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="120c47070d4d98a4" weblate-flags="read-only, safe-html, strict-same">
        <source>This has the effect of finding user-provided `tag_invoke` overloads, even if they are declared (lexically) after the definition of the calling function.</source>
        <target state="translated">This has the effect of finding user-provided `tag_invoke` overloads, even if they are declared (lexically) after the definition of the calling function.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">63</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="fa95bff76dbcc66e" weblate-flags="read-only, safe-html, strict-same">
        <source>Overloads of `tag_invoke` called by &lt;&lt;ref_value_from&gt;&gt; take the form:</source>
        <target state="translated">Overloads of `tag_invoke` called by &lt;&lt;ref_value_from&gt;&gt; take the form:</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="cbd0d793411c684e" weblate-flags="read-only, safe-html, strict-same">
        <source>``` void tag_invoke( const value_from_tag&amp;, value&amp;, T ); ```</source>
        <target state="translated">``` void tag_invoke( const value_from_tag&amp;, value&amp;, T ); ```</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="66340cb77630b9d1" weblate-flags="read-only, safe-html, strict-same">
        <source>While overloads of `tag_invoke` called by &lt;&lt;ref_value_to&gt;&gt; take the form:</source>
        <target state="translated">While overloads of `tag_invoke` called by &lt;&lt;ref_value_to&gt;&gt; take the form:</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="cceef2c3e2ebf8b6" weblate-flags="read-only, safe-html, strict-same">
        <source>``` T tag_invoke( const value_to_tag&lt; T &gt;&amp;, const value&amp; ); ```</source>
        <target state="translated">``` T tag_invoke( const value_to_tag&lt; T &gt;&amp;, const value&amp; ); ```</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">74</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3703ad2a77aeec20" weblate-flags="read-only, safe-html, strict-same">
        <source>If we implemented conversion for `user_ns::ip_address` manually with this approach, it would look like this:</source>
        <target state="translated">If we implemented conversion for `user_ns::ip_address` manually with this approach, it would look like this:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">78</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="05b05931dbf73bd2" weblate-flags="read-only, safe-html, strict-same">
        <source>Since the type being converted is embedded into the function's signature, user-provided overloads are visible to argument-dependent lookup and will be candidates when a conversion is performed:</source>
        <target state="translated">Since the type being converted is embedded into the function's signature, user-provided overloads are visible to argument-dependent lookup and will be candidates when a conversion is performed:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">86</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2d8ed9a30bebe9c3" weblate-flags="read-only, safe-html, strict-same">
        <source>Users can freely combine types with custom conversions with types with library-provided conversions. The library handles them correctly:</source>
        <target state="translated">Users can freely combine types with custom conversions with types with library-provided conversions. The library handles them correctly:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">95</context>
        </context-group>
      </trans-unit>
    </body>
  </file>
</xliff>
