[all-commits] [llvm/llvm-project] 2be3fc: [STLExtras] Remove incorrect hack to make indexed_...

Utkarsh Saxena via All-commits all-commits at lists.llvm.org
Tue Nov 14 05:38:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2be3fcab0e792d934698d5f6af7b7e17d8848ca4
      https://github.com/llvm/llvm-project/commit/2be3fcab0e792d934698d5f6af7b7e17d8848ca4
  Author: Utkarsh Saxena <usx at google.com>
  Date:   2023-11-14 (Tue, 14 Nov 2023)

  Changed paths:
    M llvm/include/llvm/ADT/STLExtras.h

  Log Message:
  -----------
  [STLExtras] Remove incorrect hack to make indexed_accessor_range operator== compatible with C++20 (#72220)

This partially reverts c312f025940d79b858166b80c50526558864d54e

The motivation behind this is unclear and the change predates the clang
[implementation](https://github.com/llvm/llvm-project/commit/38b9d313e6945804fffc654f849cfa05ba2c713d)
of
[p2468r2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2468r2.html)
so I am not sure if it was ever intended to work. Rewritten template
operators were broken since the beginning.

Moreover, moving away from `friend` would be beneficial as these would
only accepted once clang revises its implementation for fixing
https://github.com/llvm/llvm-project/issues/70210. It also helps in
making sure that older compilers still compile LLVM (in C++20).




More information about the All-commits mailing list