Hacker News new | ask | show | jobs
by chi3 2985 days ago
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.