title: C++ how to use vector of reference_wrapper
body: <p>I am totally new to reference_wrapper, so I need a very simple example to understand, please.</p>
  
  <p>I declare two vectors:</p>
  
  <pre><code>std::vector&lt;int&gt; vec;
  std::vector&lt;std::reference_wrapper&lt;int&gt;&gt; vec_r;
  </code></pre>
  
  <p>I fill vec with some values, then I want vec_r to store references to each element of vec, and I want to assign values to vec_r in order to modify the values stored in vec. What should I do?</p>