[libc++] Introduce __identity_t<T>. NFCI.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 3 Mar 2021 16:10:49 +0000 (11:10 -0500)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Thu, 4 Mar 2021 03:23:14 +0000 (22:23 -0500)
commit09fa1d0e50a3d907e8596f6ea49780b7187b727e
treeaef2aeedd722452addb44e39b9a8dff219ae13f4
parent3f5438c46cc8ddfbd221336153700da0bc527752
[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
libcxx/include/map
libcxx/include/set
libcxx/include/type_traits
libcxx/include/unordered_map
libcxx/include/unordered_set