title: why std::bind will copy twice when pass by value?
body: <p>Here is the sample code</p>
  <pre class="lang-cpp prettyprint-override"><code>class A
  {
  public:
      int a{ 3 };
      A() { std::cout &lt;&lt; &quot;con\n&quot;; };
      A(const A&amp;) { std::cout &lt;&lt; &quot;con2\n&quot;; };
  };
  
  
  int main()
  {
      std::function&lt;void(A)&gt; f = [](A a) {};
      A data;
      auto p = std::bind(f,data);
      p();
      return 0;
  }
  </code></pre>
  <p>Here is the output</p>
  <pre><code>con
  con2
  con2
  con2
  </code></pre>
  <p>I knew that the cause of the first three line output</p>
  <ol>
  <li>create the data object</li>
  <li>capture it as a member of object p</li>
  <li>pass the A object by value</li>
  </ol>
  <p>but why it calls the constructor again?<br />
  BTW, the g++ and vc++ share the same behavior</p>