Comment Comment by chi3 Unless I'm misunderstanding you, what you're asking is only possible in a function signature if the compiler inlines it.However, outside of function signatures, if you write:int a = 2; int &aref = a; int b = aref;I'd assume that the compiler is smart enough to optimize away &aref. parent chi3 8 years ago
However, outside of function signatures, if you write:
int a = 2; int &aref = a; int b = aref;
I'd assume that the compiler is smart enough to optimize away &aref.