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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 31 08:24:04 PDT 2021

Quuxplusone added inline comments.

Comment at: libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp:101-104
     // Check that result_of_t matches Expect.
     typedef typename std::result_of<ClassFunc&&(Functor&&, NonCopyable&&)>::type
     static_assert((std::is_same<ResultOfReturnType, Expect>::value), "");
ldionne wrote:
> Quuxplusone wrote:
> > I'm ambivalent as to whether you should keep `_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS` at the top of the file, or simply put lines 101-104, 124-127, and 145-148 under `#if TEST_STD_VER <= 17` instead. I'm not requesting a change here, but maybe @ldionne will have a stronger opinion one way or the other.
> Let's keep it as-is. As a matter of policy, I also want to suggest that we don't provide those escape hatches anymore, so they'll be easier to remove if the tests are written as they are right now.
@ldionne: we should take the policy thing to chat (Slack or Discord). FYI, I believe the "escape hatches" are strictly positively useful. I'd be perfectly amenable to saying "we don't really support users defining these in production." But I think they're //great// in terms of documenting our progress on omnibus papers like p0619, and also in terms of explaining otherwise-opaque `_LIBCPP_STD_VER` dependencies to the casual maintainer, and also (somewhat — maybe I'm ambivalent here) in terms of structuring the unit tests.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list