[libcxx-commits] [PATCH] D91778: [libc++] [P0966] [C++20] Fix bug PR45368 by correctly implementing P0966: string::reserve should not shrink.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 25 00:32:37 PST 2020


curdeius marked 4 inline comments as done.
curdeius added inline comments.


================
Comment at: libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp:29
-    s.reserve();
-    LIBCPP_ASSERT(s.__invariants());
-    assert(s == s0);
----------------
ldionne wrote:
> Is there a reason why you're not checking invariants anymore?
I just moved the test for `reserve()` (without size argument) to the file `reserve.pass.cpp` and it still checks invariants.
This test (for `reserve(size)`) didn't check invariants, but I can add it in this test, that seems judicious.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91778



More information about the libcxx-commits mailing list