title: C++ Lambda capture by reference
body: <p>As far I know, after running the following code myString should have got the value "Inside lambda3.secondLambda". Instead it will still have the value "Initialized". </p>
  
  <pre><code>std::string myString("Initialized");
  auto lambda3 = [&amp;]() { [&amp;myString]() { myString = "Inside lambda3.secondLambda"; }; };
  </code></pre>
  
  <p>The first lambda captures all variables by reference and the sencond captures only myString by reference. Why does it not behave as I have expected?</p>