[libcxx-commits] [PATCH] D119123: [libc++] Prepare string.{access, capacity, cons} tests for constexpr
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 7 12:44:59 PST 2022
ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.
My expectation is that the commit that will actually implement `constexpr` string should then only uncomment those `static_assert`s and also should make the necessary changes in `std::basic_string`. That's exactly how this should be done, so this is great, however I am left wondering if that's really all the test changes that are going to be necessary.
================
Comment at: libcxx/test/std/strings/basic.string/string.capacity/empty.pass.cpp:27
-int main(int, char**)
-{
- {
+bool test() {
+ {
----------------
Missing `TEST_CONSTEXPR_CXX20`.
================
Comment at: libcxx/test/std/strings/basic.string/string.capacity/empty.verify.cpp:21
+bool test() {
+ std::string c;
----------------
Missing `TEST_CONSTEXPR_CXX20`.
================
Comment at: libcxx/test/std/strings/basic.string/string.capacity/length.pass.cpp:26
-int main(int, char**)
-{
- {
+bool test() {
+ {
----------------
Missing `TEST_CONSTEXPR_CXX20`. I think several other functions below are missing it too, so I'll stop here.
================
Comment at: libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp:94
+ test();
+ // static_assert(test());
+
----------------
All of those should be
```
#if TEST_STD_VER > 17
// static_assert(test());
#endif
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119123/new/
https://reviews.llvm.org/D119123
More information about the libcxx-commits
mailing list