title: Move to lambda while using the variable in the same command
body: <p>Let us consider following structures designed to ruin the world. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  struct SkyNet {
      std::vector&lt;int&gt; terminators;
  
      SkyNet() = default;
      SkyNet(SkyNet&amp;&amp; that)
      {
          printf("Move construct\n");
          this-&gt;terminators = std::move(that.terminators);
      }
  };
  
  class Apocalypse {
  public:
      template &lt;typename Lambda&gt;
      void run(Lambda lambda) {
          lambda();
      }
  };
  
  Apocalypse create_apocalypse(const SkyNet&amp; net) {
      std::cout &lt;&lt; "Create: " &lt;&lt; net.terminators.size() &lt;&lt; " terminators\n";
      return Apocalypse();
  }
  </code></pre>
  
  <p>(Please excuse bad design of these structures and other flaws. It was created only to demonstrate specific problem.)</p>
  
  <p>Then we have simple main:</p>
  
  <pre><code>int main()
  {
      SkyNet net;
      net.terminators.push_back(10);
  
      create_apocalypse(net)
      .run([net = std::move(net)] {
          std::cout &lt;&lt; "Lambda: " &lt;&lt; net.terminators.size() &lt;&lt; " terminators\n";
      });
      return 0;
  }
  </code></pre>
  
  <p>which outputs:</p>
  
  <pre><code>Move construct
  Create: 0 terminators
  Lambda: 1 terminators
  </code></pre>
  
  <p>That means argument of the <code>run</code> function will be created(evaluated?) before calling <code>create_apocalypse</code> function on which other events are chained. Is it correct? Is this a general rule that all of arguments of an expression (not only arguments of first function) are evaluated first and only then functions get called?</p>