[libcxx-commits] [PATCH] D146984: [libc++] Add __decay_t and use it instead of decay<>::type

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 30 08:51:13 PDT 2023


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM but please double-check the CI



================
Comment at: libcxx/include/__utility/auto_cast.h:20
 
-#define _LIBCPP_AUTO_CAST(expr) static_cast<typename decay<decltype((expr))>::type>(expr)
+#define _LIBCPP_AUTO_CAST(expr) static_cast<__decay_t<decltype((expr))> >(expr)
 
----------------
Might as well do it as a fly-by. It's just a good habit to have for macros.


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