#include <vector>
#include <iostream>
#include <functional>
int main()
{
int x = 5;
std::vector<std::reference_wrapper<int>> v;
v.push_back(std::reference_wrapper<int>(x));
x = 6;
std::cout << v[0]; // 6
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KCmludCBtYWluKCkKewogICAgaW50IHggPSA1OwogICAgCiAgICBzdGQ6OnZlY3RvcjxzdGQ6OnJlZmVyZW5jZV93cmFwcGVyPGludD4+IHY7CiAgICB2LnB1c2hfYmFjayhzdGQ6OnJlZmVyZW5jZV93cmFwcGVyPGludD4oeCkpOwogICAgCiAgICB4ID0gNjsKICAgIAogICAgc3RkOjpjb3V0IDw8IHZbMF07ICAvLyA2Cn0=