Does it make any sense to do something like:
void my_fun(std::vector<int>& n)
{
for (int& i : n)
{
do something(i);
}
}
compared to a normal foreach loop without the reference? Would the value be passed by copy otherwise?