[libcxx-commits] [PATCH] D91778: [libc++] [C++20] [P0966] 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
Thu Nov 19 02:42:26 PST 2020


curdeius created this revision.
curdeius added reviewers: ldionne, mclow.lists.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
curdeius requested review of this revision.

This patch fixes the implementation as well as the tests that didn't actually test the wanted behaviour.
You'll find all the details in the bug report.
It adds as well deprecation warning for reserve() (without argument) and adds a test.

http://wg21.link/P0966R1
https://bugs.llvm.org/show_bug.cgi?id=45368
https://reviews.llvm.org/D54992


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91778

Files:
  libcxx/include/__config
  libcxx/include/string
  libcxx/test/libcxx/strings/basic.string/string.capacity/reserve.pass.cpp
  libcxx/test/std/strings/basic.string/string.capacity/reserve.deprecated_in_cxx20.verify.cpp
  libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
  libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
  libcxx/www/cxx2a_status.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91778.306354.patch
Type: text/x-patch
Size: 16188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201119/86096553/attachment.bin>


More information about the libcxx-commits mailing list