Since RVO was standard guaranteed it's common to have container returning functions e.g.:
std::vector<MyClass> get_elements() {
...
}
in such cases I've seen two styles of range-for iterating over the return value (x-value):
for (auto const &e : get_elements()) // 1. Binding each element to a const reference
for (auto &&e : get_elements()) // 2. Binding each element to an r-value reference
Is one of the two preferred/encouraged or are they any different?