[all-commits] [llvm/llvm-project] 841132: [libc++] [P0966] [C++20] Fix bug PR45368 by correc...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Nov 26 01:13:31 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 841132efda2157c5f9e07cf31469470a6481ffd9
      https://github.com/llvm/llvm-project/commit/841132efda2157c5f9e07cf31469470a6481ffd9
  Author: Marek Kurdej <marek.kurdej at gmail.com>
  Date:   2020-11-26 (Thu, 26 Nov 2020)

  Changed paths:
    M libcxx/docs/Cxx2aStatus.rst
    M libcxx/docs/Cxx2aStatusPaperStatus.csv
    M libcxx/include/__config
    M libcxx/include/string
    A libcxx/test/libcxx/strings/basic.string/string.capacity/reserve.pass.cpp
    A libcxx/test/std/strings/basic.string/string.capacity/reserve.deprecated_in_cxx20.verify.cpp
    M libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
    A libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp

  Log Message:
  -----------
  [libc++] [P0966] [C++20] Fix bug PR45368 by correctly implementing P0966: string::reserve should not shrink.

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

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D91778




More information about the All-commits mailing list