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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 25 12:42:24 PDT 2021


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp:41
+#if TEST_STD_VER <= 17
         static_assert(std::is_literal_type<Atomic>::value, "");
+#endif
----------------
What are we actually trying to test here? Can we instead check that `std::is_trivial<Atomic>` and do that under all standard modes?


================
Comment at: libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp:46
+#if TEST_STD_VER <= 17
         static_assert(std::is_literal_type<optional<T>>::value, "");
+#endif
----------------
I don't think we're actually testing anything here, are we? I think we can just remove this without reducing coverage, since that's not how we should test that `optional` is constexpr-friendly. Also applies below.


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