Lambda capture by value timing

What does this print?

#include <iostream>
#include <functional>
int main() {
    int x = 1;
    auto f = [=]() { return x; };
    x = 42;
    std::cout << f();
}