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

Wmbat via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 26 12:22:55 PDT 2021

Wmbat added inline comments.

Comment at: libcxx/docs/UsingLibcxx.rst:266-267
+  This macro is used to re-enable `is_literal_type` and `is_literal_type_v`.
Quuxplusone wrote:
> Wmbat wrote:
> > Quuxplusone wrote:
> > > Excellent noticing of documentation. :) However, on closer inspection of p0619r4, I think you should:
> > > - 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. :)
So, I should deprecate & remove `result_of` in this commit as well? Looking at the source code of `type_traits`. `result_of` hasn't been removed or deprecated yet. I would have to rename the commit as the name wouldn't imply all that is being done in it.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list