[libcxx-commits] [PATCH] D109298: [libc++][test] Add tuple trivial destructor test
Joe Loser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 10 19:15:36 PDT 2022
jloser marked 2 inline comments as done.
jloser added inline comments.
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp:34
+
+bool test() {
+ int count = 0;
----------------
philnik wrote:
> Can this test be `constexpr` in C++20?
Yep, just made it so.
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp:48-52
+ static_assert(std::is_trivially_destructible<std::tuple<>>::value, "");
+ static_assert(std::is_trivially_destructible<std::tuple<void*>>::value, "");
+ static_assert(std::is_trivially_destructible<std::tuple<int, float>>::value, "");
+ static_assert(!std::is_trivially_destructible<std::tuple<std::string>>::value, "");
+ static_assert(!std::is_trivially_destructible<std::tuple<int, std::string>>::value, "");
----------------
philnik wrote:
> I think I'd put the `static_assert`s outside the main.
Sure, I don't feel strongly. Moved them outside.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109298/new/
https://reviews.llvm.org/D109298
More information about the libcxx-commits
mailing list