[libcxx-commits] [PATCH] D120951: [libc++] Prepare string tests for constexpr

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 8 17:36:49 PST 2022


EricWF added a comment.

Doesn't this change make all of the tests with functions decorated with TEST_CONSTEXPR_AFTER_CXX20 undefined behavior, since it's undefined to have constexpr on a function that is never constexpr?



================
Comment at: libcxx/test/std/strings/basic.string/string.contains/contains.string_view.pass.cpp:93
 #if TEST_STD_VER > 17
   // static_assert(test());
 #endif
----------------
Please don't go adding commented out tests in the future. 


================
Comment at: libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp:34
 template <class S, class It>
-void
+TEST_CONSTEXPR_CXX20 void
 test_exceptions(S s, It first, It last)
----------------
Is this ever constexpr?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120951/new/

https://reviews.llvm.org/D120951



More information about the libcxx-commits mailing list