title: Are references separate types in C++? If not, why are they written in the type?
body: <p>From what I can tell, references can be used wherever the original type can (I'm <strong>not</strong> implying the reverse is true), the only difference is their mutation semantics (when the variables are used as lvalues).</p>
  
  <p>Wouldn't they then qualify as the same type as the original? <strong>If so, why is the fact that something is a reference, stored in its type?</strong></p>
  
  <p>Edit: if references are a different type, why can they be substituted for the original type in so many situations, without explicit casting? Is there implicit cast involved?</p>
  
  <p>Example:</p>
  
  <pre><code>void bar(int&amp; a);
  
  int x;
  int&amp; y = x;
  
  bar(y) // matching type
  bar(x) // what happened here? was x cast to a reference?
  </code></pre>