[libcxx-commits] [PATCH] D80558: Add constexpr to pair

Michael Schellenberger Costa via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 11 00:01:11 PDT 2020

miscco marked 3 inline comments as done.
miscco added a comment.

Took the opportunity to look through this again. Mostly nits about the tests

Comment at: libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp:35
+#if TEST_STD_VER >= 20
+  if (!std::is_constant_evaluated())
I believe I have to check this one here, It seems moving to `ConstexprTestTypes::MoveOnly` should suffice

Comment at: libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp:40
+#if TEST_STD_VER >= 20
+       using C = ConstexprTestTypes::TestType;
I am really not too happy with this dance. I guess one should add one additional section for C++20 only

Comment at: libcxx/test/std/utilities/utility/pairs/pairs.pair/swap.pass.cpp:24
+    TEST_CONSTEXPR_CXX20 S(int j) : i(j) {}
     S * operator& () { assert(false); return this; }
     S const * operator& () const { assert(false); return this; }
Could we remove those by the way? I do not see any use for them

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list