[all-commits] [llvm/llvm-project] 09fa1d: [libc++] Introduce __identity_t<T>. NFCI.

Quuxplusone via All-commits all-commits at lists.llvm.org
Wed Mar 3 19:24:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09fa1d0e50a3d907e8596f6ea49780b7187b727e
      https://github.com/llvm/llvm-project/commit/09fa1d0e50a3d907e8596f6ea49780b7187b727e
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-03-03 (Wed, 03 Mar 2021)

  Changed paths:
    M libcxx/include/map
    M libcxx/include/set
    M libcxx/include/type_traits
    M libcxx/include/unordered_map
    M libcxx/include/unordered_set

  Log Message:
  -----------
  [libc++] Introduce __identity_t<T>. NFCI.

This is just a shorter synonym for `__identity<T>::type`.
Use it consistently throughout, where possible.

There is still some metaprogramming in <memory> and <variant>
where `__identity` is being used _without_ immediately calling
`::type` on it; but this is the unusual case, and it will become
even less usual as we start deliberately protecting certain types
against deduction (e.g. D97742).

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




More information about the All-commits mailing list