@dblaikie pointed an issue wherein if you wrote a ranged-based for like this:
for (auto X : enumerate(std::vector<int>{1,2,3})) { }
The vector would be destroyed since the range adapter stored the argument by reference. This patch adds a new template to stl extras called remove_rvalue_reference which is similar to std::remove_reference but only removes rvalue reference. This way, if it is constructed with an rvalue, it will copy the range, but if it is constructed with an lvalue, it will store by reference.
A test is added to verify that it works. The same test was confirmed to segfault before this patch.