title: Copy constructor called for captured variable instead of move constructor
body: <p>When compiled with gcc 4.7.2 or 4.8.1 and run the following program</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;functional&gt;
  
  class A
  {
  public:
      A()
      {
      }
      A(const A&amp; a)
      {
          printf("Copy ctor\n");
      }
      A(A&amp;&amp; a)
      {
          printf("Move ctor\n");
      }
  };
  
  int main()
  {
      A a;
      auto func = [a] {
      };
  
      auto newfunc = std::move(func);
      return 0;
  }
  </code></pre>
  
  <p>will give the output:</p>
  
  <pre><code>Copy ctor
  Move ctor
  </code></pre>
  
  <p>which seems to be perfectly normal.</p>
  
  <p>However, when <code>A a;</code> is changed to <code>const A a;</code>, the output is as follows:</p>
  
  <pre><code>Copy ctor
  Copy ctor
  </code></pre>
  
  <p>Why is the move of lambda affected by the fact whether the original variable has been const or not?</p>
  
  <p>FWIW, MSVC2012 always makes two copies.</p>