[all-commits] [llvm/llvm-project] 77eac3: [ADT] Make `llvm::identity` a transparent function...

Joseph Loser via All-commits all-commits at lists.llvm.org
Thu Aug 25 20:07:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77eac327167c696cbec4c7f235e6b00179ea7358
      https://github.com/llvm/llvm-project/commit/77eac327167c696cbec4c7f235e6b00179ea7358
  Author: Joe Loser <joeloser at fastmail.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

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

  Log Message:
  -----------
  [ADT] Make `llvm::identity` a transparent function object

`llvm::identity` is similar to `std::identity` from C++20, but one surprising
thing is that `llvm::identity` is not a transparent function object. Add the
`is_transparent` type alias to denote it can be used as a transparent function
object.

Differential Revision: https://reviews.llvm.org/D132628




More information about the All-commits mailing list