mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 04:46:07 +00:00

`overload_compare_iterator` only supports operations required for forward iterators. On the other hand, it is used for output iterators of uninitialized memory algorithms, which requires it to be forward iterator. As a result, `overload_compare_iterator<I>::iterator_category` should always be `std::forward_iterator_tag` if we don't extend its ability. The correct `iterator_category` can prevent standard library implementations like MSVC STL attempting random access operations on `overload_compare_iterator`. Fixes #74756.