[libcxx-commits] [PATCH] D102992: [libcxx][type_traits] deprecates `std::is_literal_type` and remove it for C++20

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 26 05:47:26 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/docs/UsingLibcxx.rst:266-267
 
+**_LIBCPP_ENABLE_CXX20_REMOVED_IS_LITERAL_TYPE**:
+  This macro is used to re-enable `is_literal_type` and `is_literal_type_v`.
 
----------------
Wmbat wrote:
> Quuxplusone wrote:
> > Excellent noticing of documentation. :) However, on closer inspection of p0619r4, I think you should:
> > - rename to `_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS`
> > - include `result_of` and `result_of_t` under the same switch
> > - (and then you //won't// need to alphabetize, because `TY...`, unlike `IS...`, comes after `RA...`)
> > 
> > Then you can mark p0619 section D.13 as complete.
> `result_of` and `result_of_t` don't look deprecated or removed yet (in the `type_traits` header). Should I add them under the `_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS` macro documentation and not touch the code? I think might be missing something (likely) here.
Looks to me like they were removed in C++20:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0619r4.html#3.12
and deprecated in-or-before C++17 (might need to dig to find exactly when).
And yes, I'm saying put the whole section D.13 under that same macro, `_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS`. And yes this will involve touching the code as well as the documentation. :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102992/new/

https://reviews.llvm.org/D102992



More information about the libcxx-commits mailing list