[libc++] Undeprecate the std::allocator<void> specialization
authorLouis Dionne <ldionne.2@gmail.com>
Tue, 15 Jun 2021 20:08:38 +0000 (16:08 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Wed, 16 Jun 2021 13:54:29 +0000 (09:54 -0400)
commit87784cc6fb3453a17e0e7826b943a1d93cbfeccf
tree05996e60372f1e72ba60803d7a0f070eee1582fc
parent70b37f4c03cd189c94167dc22d9f5303c8773092
[libc++] Undeprecate the std::allocator<void> specialization

While the std::allocator<void> specialization was deprecated by
https://wg21.link/p0174#2.2, the *use* of std::allocator<void> by users
was not. The intent was that std::allocator<void> could still be used
in C++17 and C++20, but starting with C++20 (with the removal of the
specialization), std::allocator<void> would use the primary template.
That intent was called out in wg21.link/p0619r4#3.9.

As a result of this patch, _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
will also not control whether the explicit specialization is provided or
not. It shouldn't matter, since in C++20, one can simply use the primary
template.

Fixes http://llvm.org/PR50299

Differential Revision: https://reviews.llvm.org/D104323
13 files changed:
libcxx/docs/UsingLibcxx.rst
libcxx/include/__memory/allocator.h
libcxx/include/memory
libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.cxx2a.pass.cpp
libcxx/test/std/utilities/memory/default.allocator/PR50299.compile.pass.cpp [new file with mode: 0644]
libcxx/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp
libcxx/test/std/utilities/memory/default.allocator/allocator.dtor.pass.cpp
libcxx/test/std/utilities/memory/default.allocator/allocator_pointers.pass.cpp
libcxx/test/std/utilities/memory/default.allocator/allocator_types.deprecated_in_cxx17.verify.cpp
libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
libcxx/test/std/utilities/memory/default.allocator/allocator_types.removed_in_cxx20.verify.cpp
libcxx/test/std/utilities/memory/default.allocator/allocator_types.void.compile.pass.cpp [moved from libcxx/test/libcxx/depr/depr.default.allocator/allocator_void.cxx2a.pass.cpp with 51% similarity]
libcxx/test/std/utilities/memory/default.allocator/allocator_void.deprecated_in_cxx17.verify.cpp [deleted file]