0

The type of a reference and the object to which the reference refers must match exactly. It's mean is that,

double dval = 3.14; 
int &refi = dval; 

will be given a compiler error.

But when a const reference binds to different type object is allowed. How is it possible (I'm asking an explenation from c++ standards view)and why?

Regards, Tunahan.

golazo
  • 317
  • 5
  • 15

0 Answers0