Of course it would also work if toReturn was declared like this:

vector<int>& toReturn() {
static vector<int> x = {2, 4, 6, 8, 10};
return x;
}Assuming I got the syntax correct, since I...