gcc/libstdc++-v3/include/ext
Jonathan Wakely 754fca77e8 libstdc++: Fix std::allocator<void> for versioned namespace
Removing the allocator<void> specialization for the versioned namespace
breaks _Extptr_allocator<void> because the allocator<void>
specialization was still declared in <bits/memoryfwd.h>, making it an
incomplete type.  It wrong to remove that specialization anyway, because
it is still needed pre-C++20.

This removes the #if ! _GLIBCXX_INLINE_VERSION check, so that
allocator<void> is still explicitly specialized for the versioned
namespace, consistent with the normal unversioned namespace mode.

To make _Extptr_allocator<void> usable as a ProtoAllocator, this change
adds a default constructor and converting constructor. That is
consistent with std::allocator<void> since C++20 (and harmless to do for
earlier standards).

I'm also explicitly specializing allocator_traits<allocator<void>> so
that it doesn't need to use allocator<void>::construct and destroy.
Doing that allows those members to be removed, further simplifying
allocator<void>.  That new explicit specialization can delete the
allocate, deallocate and max_size members, which are always ill-formed
for allocator<void>.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/alloc_traits.h (allocator_traits): Add explicit
	specialization for allocator<void>. Improve doxygen comments.
	* include/bits/allocator.h (allocator<void>): Restore for the
	versioned namespace.
	(allocator<void>::construct, allocator<void>::destroy): Remove.
	* include/ext/extptr_allocator.h (_Extptr_allocator<void>):
	Add default constructor and converting constructor.
2021-08-28 14:37:19 +01:00
..
pb_ds
algorithm
aligned_buffer.h
alloc_traits.h
atomicity.h
bitmap_allocator.h
cast.h
cmath
codecvt_specializations.h
concurrence.h
debug_allocator.h
enc_filebuf.h
extptr_allocator.h libstdc++: Fix std::allocator<void> for versioned namespace 2021-08-28 14:37:19 +01:00
functional
iterator
malloc_allocator.h
memory
mt_allocator.h
new_allocator.h libstdc++: Use __builtin_operator_new when available [PR94295] 2021-07-22 14:38:34 +01:00
numeric
numeric_traits.h libstdc++: Use __extension__ instead of diagnostic pragmas 2021-07-16 15:03:03 +01:00
pod_char_traits.h
pointer.h
pool_allocator.h
random
random.tcc
rb_tree
rc_string_base.h
rope libstdc++: Remove __gnu_cxx::rope::erase(size_type) [PR102048] 2021-08-25 22:28:46 +01:00
ropeimpl.h
slist
sso_string_base.h
stdio_filebuf.h
stdio_sync_filebuf.h
string_conversions.h
throw_allocator.h
type_traits.h libstdc++: Simplify n-ary arithmetic promotion traits 2021-08-18 14:26:39 +01:00
typelist.h
vstring_fwd.h
vstring_util.h
vstring.h
vstring.tcc