c++ function: pass non const argument to const reference parameter
问题 suppose I have a function which accept const reference argument pass, int func(const int &i) { /* */ } int main() { int j = 1; func(j); // pass non const argument to const reference j=2; // reassign j } this code works fine.according to C++ primer, what this argument passing to this function is like follows, int j=1; const int &i = j; in which i is a synonym(alias) of j, my question is: if i is a synonym of j, and i is defined as const, is the code: const int &i = j redelcare a non const