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
We use _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS and this change breaks code that uses allocator<void> since _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp& reference; in the primary template doesn't compile: error: cannot form a reference to 'void'.