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.
It will be int&, I think: en.cppreference.com/w/cpp/language...
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.