[libcxx-commits] [PATCH] D146984: [libc++] Add __decay_t and use it instead of decay<>::type
Tim Song via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 30 18:14:31 PDT 2023
tcanens added inline comments.
================
Comment at: libcxx/include/__type_traits/decay.h:73
#if _LIBCPP_STD_VER >= 14
-template <class _Tp> using decay_t = typename decay<_Tp>::type;
+template <class _Tp> using decay_t = __decay_t<_Tp>;
#endif
----------------
This change is breaking (and nonconforming). Alias templates are transparent, so this changes the mangling of
```
template<class T> void f(std::decay_t<T>);
template void f<int>(int);
```
It also breaks declaration matching between that and
```
template<class T> void f(typename std::decay<T>::type);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146984/new/
https://reviews.llvm.org/D146984
More information about the libcxx-commits
mailing list