So I am having a discussion with a friend about reference and pointers.
What we got talking about is \"you can take an address of a pointer but you cant take an addr
By the time you apply the address-of operator in your example, there is no distinction between the reference and the real object anymore. The reference is the object.
The rule instead applies at the moment you try to declare a pointer to a reference. Try it:
int x = 0;
int &*ptr = &x;
Result with MSVC 2013:
error C2528: 'ptr' : pointer to reference is illegal