title: Do c++11 lambdas capture variables they don't use?
body: <p>When I use <code>[=]</code> to indicate that I would like all local variables to be captured by value in a lambda, will that result in <em>all</em> local variables in the function being copied, or just all local variables <em>that are used by the lambda</em>?</p>
  
  <p>So, for example, if i I have:</p>
  
  <pre><code>vector&lt;int&gt; my_huge_vector(100000);
  int my_measly_int;
  some_function([=](int i){ return my_measly_int + i; });
  </code></pre>
  
  <p>Will my_huge_vector be copied, even though I don't use it in the lambda?</p>