title: Get value from reference in C++
body: <p>I have the problem to get a reference to an int (from a collection of ints, QList). But I need the value to call another function which uses call-by-value. </p>
  
  <pre><code>int my_var = collection[i];
  
  nextFunction(my_var); --&gt; ERROR no matching function ... (int&amp;) ...
  </code></pre>
  
  <p>How do I get the value from this reference or convert it?</p>
  
  <p>The signatufe of the function I want to call looks like this:</p>
  
  <pre><code>nextFunction(int id, ...);
  </code></pre>
  
  <p>and its actually a constructor.</p>