-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 ranges
Description
Lines 8149 to 8154 in ef62d3f
| _Uninitialized_backout<iter_value_t<_It>*> _Backout{_Temp_ptr, _Temp_ptr + _Count}; | |
| iter_difference_t<_It> _Chunk_size = _Isort_max<_It>; | |
| for (;;) { | |
| // unconditionally merge elements back into the source buffer | |
| _Chunk_size <<= 1; | |
| _Chunked_merge_common(_Temp_ptr, _Temp_ptr + _Count, _First, _Chunk_size, _Count, _Pred, _Proj); |
Line 8191 in ef62d3f
| const auto _Backout_end = _Dest + _Count; |
When _Count is an integer-class type, _Temp_ptr + _Count will be ill-formed.
#include <algorithm>
#include <ranges>
#include <vector>
int main() {
std::vector<int> v;
auto r = std::views::iota(0ULL, v.size())
| std::views::transform([&v](auto i) -> auto& { return v[i]; });
std::ranges::stable_sort(r);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!rangesC++20/23 rangesC++20/23 ranges