Open FelixDombek opened 3 years ago
Using a normal ranged for with an rvalue is supported in C++, so adaptors::indexed should support it too.
Currently it is too easy to get a segfault:
std::vector<int> getVec(); for (const auto& i : boost::adaptors::index(getVec())) { std::cout << i; }
This should have a move constructor and be able to store the temporary object.
Using a normal ranged for with an rvalue is supported in C++, so adaptors::indexed should support it too.
Currently it is too easy to get a segfault:
This should have a move constructor and be able to store the temporary object.