How does function overloading work in the following case?
<p>The following code compiles and runs but I'm not sure what exactly is going on at a lower level. Doesn't a reference just store the address of the object being referenced? If so, both test functions are receiving an address as a parameter? Or is the C++ implementation able to differentiate between these types in some other way?</p>

<pre><code>int main() {
    int i = 1;
    cout &lt;&lt; test(i) &lt;&lt; endl;
}

char test(int &amp;i) {
    return 'a';
}

char test(int *i) {
    return 'b';
}
</code></pre>
