[libcxx-commits] [PATCH] D109298: [libc++][test] Add tuple trivial destructor test

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 10 02:11:11 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp:34
+
+bool test() {
+  int count = 0;
----------------
Can this test be `constexpr` in C++20?


================
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, "");
----------------
I think I'd put the `static_assert`s outside the main.


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