[libcxx-commits] [PATCH] D89057: Add the C++17 <memory_resource> header (mono-patch)

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 7 12:06:44 PST 2022


Quuxplusone updated this revision to Diff 398211.
Quuxplusone marked 26 inline comments as done.
Quuxplusone added a comment.

Address @philnik's review comments.
Mark `allocate` as `[[nodiscard]]`: that might be new in C++20, but I think we can get away with backporting it anyway. Should add a test for that, I guess.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89057

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/Status/Cxx20Issues.csv
  libcxx/docs/Status/Cxx2bIssues.csv
  libcxx/include/CMakeLists.txt
  libcxx/include/__config
  libcxx/include/__memory_resource/memory_resource.h
  libcxx/include/__memory_resource/monotonic_buffer_resource.h
  libcxx/include/__memory_resource/polymorphic_allocator.h
  libcxx/include/__memory_resource/pool_options.h
  libcxx/include/__memory_resource/synchronized_pool_resource.h
  libcxx/include/__memory_resource/unsynchronized_pool_resource.h
  libcxx/include/deque
  libcxx/include/forward_list
  libcxx/include/list
  libcxx/include/map
  libcxx/include/memory_resource
  libcxx/include/module.modulemap
  libcxx/include/regex
  libcxx/include/set
  libcxx/include/string
  libcxx/include/unordered_map
  libcxx/include/unordered_set
  libcxx/include/vector
  libcxx/include/version
  libcxx/lib/abi/CHANGELOG.TXT
  libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
  libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist
  libcxx/src/CMakeLists.txt
  libcxx/src/memory_resource.cpp
  libcxx/src/memory_resource_init_helper.h
  libcxx/test/libcxx/diagnostics/detail.headers/memory_resource/memory_resource.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/memory_resource/monotonic_buffer_resource.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/memory_resource/polymorphic_allocator.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/memory_resource/pool_options.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/memory_resource/synchronized_pool_resource.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/memory_resource/unsynchronized_pool_resource.module.verify.cpp
  libcxx/test/libcxx/double_include.sh.cpp
  libcxx/test/libcxx/min_max_macros.compile.pass.cpp
  libcxx/test/libcxx/no_assert_include.compile.pass.cpp
  libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp
  libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/db_deallocate.pass.cpp
  libcxx/test/libcxx/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp
  libcxx/test/libcxx/utilities/utility/mem.res/mem.res.pool/unsynchronized_buffer.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp
  libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/assign.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/copy.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/default.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/memory_resource_convert.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.ctor/other_alloc.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/equal.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.eq/not_equal.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_rvalue.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair_values.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair_evil.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_types.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/deallocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/destroy.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/select_on_container_copy_construction.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_deque_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_forward_list_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_list_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_map_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_regex_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_set_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_string_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_map_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_unordered_set_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.aliases/header_vector_synop2.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.global/default_resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.global/new_delete_resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.global/null_memory_resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/copy_move.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/with_default_resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.ctor/without_buffer.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_deallocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_exception_safety.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_initial_buffer.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_underaligned_buffer.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_from_zero_sized_buffer.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_in_geometric_progression.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_overaligned_request.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/allocate_with_initial_size.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/equality.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/ctor_does_not_allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/sync_with_default_resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.ctor/unsync_with_default_resource.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/equality.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_overaligned_request.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_allocate_reuse_blocks.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/sync_deallocate_matches_allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_overaligned_request.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_allocate_reuse_blocks.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res.pool/mem.res.pool.mem/unsync_deallocate_matches_allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/construct.fail.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/equal.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.eq/not_equal.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/private_members.fail.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.private/protected_members.fail.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/allocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/deallocate.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/dtor.pass.cpp
  libcxx/test/std/utilities/utility/mem.res/mem.res/mem.res.public/is_equal.pass.cpp
  libcxx/test/support/count_new.h
  libcxx/test/support/test_std_memory_resource.h
  libcxx/utils/generate_feature_test_macro_components.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89057.398211.patch
Type: text/x-patch
Size: 302561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220107/574c7d72/attachment-0001.bin>


More information about the libcxx-commits mailing list