As pointed out in various questions on stackoverflow: References are not reseatable
I am able to compile out the below code snippet :
int a1 =10;
int b = 15;
int& intref = a1;
intref = b;
reading discussion over the above cited reference, I am in a view that the above code should not compile at all. But it does. Can someone please point me out to a more explanatory resource regarding C++ references? Or give me a reason what wrong am I doing.
I am using MinGW 4.9.1 Win32 compiler, if that matters.