[all-commits] [llvm/llvm-project] d9c225: [libc++][test] Fix `overload_compare_iterator::ite...

A. Jiang via All-commits all-commits at lists.llvm.org
Tue Oct 15 07:35:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9c2256c97948b648cb17a3757660070be5987a6
      https://github.com/llvm/llvm-project/commit/d9c2256c97948b648cb17a3757660070be5987a6
  Author: A. Jiang <de34 at live.cn>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M libcxx/test/std/utilities/memory/specialized.algorithms/overload_compare_iterator.h

  Log Message:
  -----------
  [libc++][test] Fix `overload_compare_iterator::iterator_category` (#112165)

`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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list