<?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="c557c7a8dfb68b15" weblate-flags="read-only">
        <source>Echo __example__</source>
        <target state="translated">Echo __example__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">10</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f4740f6e60d61b43" weblate-flags="read-only">
        <source>This example develops an initiating function called [*echo]. The operation will read up to the first newline on a stream, and then write the same line including the newline back on the stream. First we define the input parameters and results, then declare our initiation function. For our echo operation the only inputs are the stream and the completion token. The output is the error code which is usually included in all completion handler signatures.</source>
        <target state="translated">This example develops an initiating function called [*echo]. The operation will read up to the first newline on a stream, and then write the same line including the newline back on the stream. First we define the input parameters and results, then declare our initiation function. For our echo operation the only inputs are the stream and the completion token. The output is the error code which is usually included in all completion handler signatures.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">12</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4880188a614b8b5a" weblate-flags="read-only">
        <source>Now that we have a declaration, we will define the body of the function. We want to achieve the following goals: perform static type checking on the input parameters, set up the return value as per __N3747__, and launch the composed operation by constructing an intermediate, stateful completion handler and invoking it.</source>
        <target state="translated">Now that we have a declaration, we will define the body of the function. We want to achieve the following goals: perform static type checking on the input parameters, set up the return value as per __N3747__, and launch the composed operation by constructing an intermediate, stateful completion handler and invoking it.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cc8520ee6430758c" weblate-flags="read-only">
        <source>The initiating function contains a few relatively simple parts. There is the customization of the return value type, static type checking, building the return value type using the helper, and creating and launching the `echo_op` composed operation object.</source>
        <target state="translated">The initiating function contains a few relatively simple parts. There is the customization of the return value type, static type checking, building the return value type using the helper, and creating and launching the `echo_op` composed operation object.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">28</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ecfb4e96f40a4b4b" weblate-flags="read-only">
        <source>The implementation strategy is to make the composed object meet the requirements of a completion handler by being movable, and by making it invocable so it can be used as a continuation for the asynchronous operations it launches. Rather than using `std::bind` or `boost::bind`, which destroys the type information and therefore breaks the associators, we will simply pass `std::move(*this)` as the completion handler parameter for any operations that we initiate. For the move to work correctly, care must be taken to ensure that no access to data members are made after the move takes place. Here is the complete implementation of our composed operation:</source>
        <target state="translated">The implementation strategy is to make the composed object meet the requirements of a completion handler by being movable, and by making it invocable so it can be used as a continuation for the asynchronous operations it launches. Rather than using `std::bind` or `boost::bind`, which destroys the type information and therefore breaks the associators, we will simply pass `std::move(*this)` as the completion handler parameter for any operations that we initiate. For the move to work correctly, care must be taken to ensure that no access to data members are made after the move takes place. Here is the complete implementation of our composed operation:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">33</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="31715cce83d52eea" weblate-flags="read-only">
        <source>There are some common mistakes that should be avoided when writing composed operations:</source>
        <target state="translated">There are some common mistakes that should be avoided when writing composed operations:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">45</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cb4a41007c116bd7" weblate-flags="read-only">
        <source>* Type erasing the final handler. This will cause undefined behavior.</source>
        <target state="translated">* Type erasing the final handler. This will cause undefined behavior.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">48</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="62ea333164a739f9" weblate-flags="read-only">
        <source>* Forgetting to include a return statement after calling an</source>
        <target state="translated">* Forgetting to include a return statement after calling an</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8ae4b56ba9d1f79c" weblate-flags="read-only">
        <source>* Calling a synchronous function by accident. In general composed</source>
        <target state="translated">* Calling a synchronous function by accident. In general composed</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">53</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a0d783bf341e9b43" weblate-flags="read-only">
        <source>* Forgetting to provide `executor_type` and `get_executor` for the</source>
        <target state="translated">* Forgetting to provide `executor_type` and `get_executor` for the</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">57</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b79d0104586d625a" weblate-flags="read-only">
        <source>* Forgetting to create an object of type __executor_work_guard__ with the</source>
        <target state="translated">* Forgetting to create an object of type __executor_work_guard__ with the</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">65</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="35ddd903092b83a0" weblate-flags="read-only">
        <source>* For operations which complete immediately (i.e. without calling an</source>
        <target state="translated">* For operations which complete immediately (i.e. without calling an</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">68</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5329280e8a06e823" weblate-flags="read-only">
        <source>The listing for a complete, runnable version of this example is in [path_link example/echo-op/echo_op.cpp echo_op.cpp].</source>
        <target state="translated">The listing for a complete, runnable version of this example is in [path_link example/echo-op/echo_op.cpp echo_op.cpp].</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">77</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
