title: What happens when setter-method arguments are references in C++?
body: <p>I'm a little confused about when things are copied and when they are referenced in C++. For example I have this very simple method where the arguments are references:</p>
  
  <pre><code>void setTimeSig(const int &amp;tsNumerator, const int &amp;tsDenominator) {
      this-&gt;timeSigNum = tsNumerator;
      this-&gt;timeSigDenom = tsDenominator;
  }
  </code></pre>
  
  <p>Does this mean that because I'm using references when the function where <code>setTimeSig</code> is finished, the object with the <code>timeSigNum</code> and <code>timeSigDenom</code> will have these two fields empty? Or is it being copied at this point: <code>this-&gt;timeSigNum = tsNumerator;</code></p>
  
  <p>And one more question about the same thing:</p>
  
  <pre><code>class A{
  public:
      B bObject;
  }
  B b;
  A a;
  a.bObject = b;
  </code></pre>
  
  <p>Is <code>bObject</code> now referencing to b or does it contain a copy?</p>
  
  <p>Any information on where or what I should read about this is much appreciated. I'm still confusing many things.</p>