[libcxx-commits] [PATCH] D126210: [libcxx] Fix allocator<void>::pointer in C++20 with removed members

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 14 12:59:26 PDT 2022


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM with some comments. Please pay attention to the suggestions, some of them contain more than one fix per line and it's easy to miss!

Thanks!



================
Comment at: libcxx/docs/ReleaseNotes.rst:112-116
+- The ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION`` has been added to allow
+  re-enabling ``allocator<void>`` specialization. When used in conjuction with
+  ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS``, this ensures accesses to members of
+  ``allocator<void>`` do not cause compiler errors.
+
----------------



================
Comment at: libcxx/docs/UsingLibcxx.rst:328-330
+  Use it in conjuction with `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS`
+  to ensure uses of removed members inside `allocator<void>` do not cause
+  compile errors.
----------------



================
Comment at: libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_allocator_void_no_members.fail.cpp:10
+// Check that members of std::allocator<void> are not provided in C++20
+// with _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION and wihout
+// _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS.
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126210



More information about the libcxx-commits mailing list