[all-commits] [llvm/llvm-project] 94e7c0: [libc++] Remove get_temporary_buffer and return_te...

A. Jiang via All-commits all-commits at lists.llvm.org
Mon Sep 16 08:53:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94e7c0b051c79fd56205f115771980f2e7812306
      https://github.com/llvm/llvm-project/commit/94e7c0b051c79fd56205f115771980f2e7812306
  Author: A. Jiang <de34 at live.cn>
  Date:   2024-09-16 (Mon, 16 Sep 2024)

  Changed paths:
    M libcxx/docs/ReleaseNotes/20.rst
    M libcxx/docs/Status/Cxx20Papers.csv
    M libcxx/docs/UserDocumentation.rst
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__algorithm/inplace_merge.h
    M libcxx/include/__algorithm/stable_partition.h
    M libcxx/include/__algorithm/stable_sort.h
    M libcxx/include/__memory/temporary_buffer.h
    A libcxx/include/__memory/unique_temporary_buffer.h
    M libcxx/include/memory
    M libcxx/include/module.modulemap
    M libcxx/include/syncstream
    M libcxx/test/libcxx/diagnostics/memory.nodiscard.verify.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp
    M libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
    M libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp
    M libcxx/utils/libcxx/test/modules.py
    M llvm/utils/gn/secondary/libcxx/include/BUILD.gn

  Log Message:
  -----------
  [libc++] Remove get_temporary_buffer and return_temporary_buffer (#100914)

Works towards P0619R4 / #99985.

The use of `std::get_temporary_buffer` and `std::return_temporary_buffer`
are replaced with `unique_ptr`-based RAII buffer holder.

Escape hatches:
- `_LIBCPP_ENABLE_CXX20_REMOVED_TEMPORARY_BUFFER` restores
`std::get_temporary_buffer` and `std::return_temporary_buffer`.

Drive-by changes:
- In `<syncstream>`, states that `get_temporary_buffer` is now removed,
because `<syncstream>` is added in C++20.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list