re: No, because the non-reference variable will contain the value of the bounded value of the reference. int value = 100; int &ref_value = value...

Oh yeah okay you're dereferencing when assigning to some_value, gotcha. Just another question: if you use auto, what would the inferred type be?

int value = 100;
int &ref_value = value;
auto new_value = ref_value;

Does new_value remain a reference or now contains the dereferenced value?

Not entirely sure as auto in some instances is tricky. I believe in your example that new_value will the type int.

code of conduct - report abuse