[libcxx-commits] [PATCH] D110598: [libc++] Implement P0980R1 (constexpr std::string)

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 26 06:31:23 PDT 2022


Mordante added a comment.

SGTM modulo some small issues.



================
Comment at: libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp:82
-  // static_assert(test());
-#endif
 
----------------
philnik wrote:
> Mordante wrote:
> > Why don't you test this in `constexpr`? The signature has changed in the paper.
> This test makes extremely large allocations, like `numeric_limits<size_t>::max()` large. Because of this the constant evaluations fails.
Then please a test to validate the function can be called compile-time and add comment why we done the minimal testing for compile-time testing.


================
Comment at: libcxx/test/std/strings/basic.string/string.contains/contains.char.pass.cpp:19
 
-bool test()
+TEST_CONSTEXPR_CXX20 bool test()
 {
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110598



More information about the libcxx-commits mailing list