c++ lambda capture by value
<p>I am reading through the C++ lambda section in chapter 3 of <a href="http://www.cppstdlib.com/">this book</a> and the following code confuses me:</p>

<pre><code>int x = 0;
int y = 42;
auto qqq = [x, &amp;y] {
    std::cout &lt;&lt; "x: " &lt;&lt; x &lt;&lt; std::endl;
    std::cout &lt;&lt; "y: " &lt;&lt; y &lt;&lt; std::endl;
    ++y;
};
x = y = 77;
qqq();
qqq();
std::cout &lt;&lt; "final y: " &lt;&lt; y &lt;&lt; std::endl;
</code></pre>

<p>This code prints out:</p>

<pre><code>x: 0
y: 77
x: 0
y: 78
final y: 79
</code></pre>

<p>Why does qqq() not register that x has changed to 77? It was stated that passing by value means we can read but not modify data readable where the lambda was defined. Does that mean we can't see changes after it's definition?</p>