gcc/libstdc++-v3/include/ext
Jonathan Wakely db9dec545b libstdc++: Fix missing members in std::allocator<void>
The changes in 75c6a925da were slightly
incorrect, because the converting constructor should be noexcept, and
the POCMA and is_always_equal traits should still be present in C++20.
This fixes it, and slightly refactors the preprocessor conditions and
order of members. Also add comments explaining things.

The non-standard construct and destroy members added for PR 78052 can be
private if allocator_traits<allocator<void>> is made a friend.

libstdc++-v3/ChangeLog:

	* include/bits/allocator.h (allocator<void>) [C++20]: Add
	missing noexcept to constructor. Restore missing POCMA and
	is_always_equal_traits.
	[C++17]: Make construct and destroy members private and
	declare allocator_traits as a friend.
	* include/bits/memoryfwd.h (allocator_traits): Declare.
	* include/ext/malloc_allocator.h (malloc_allocator::allocate):
	Add nodiscard attribute. Add static assertion for LWG 3307.
	* include/ext/new_allocator.h (new_allocator::allocate): Add
	static assertion for LWG 3307.
	* testsuite/20_util/allocator/void.cc: Check that converting
	constructor is noexcept. Check for propagation traits and
	size_type and difference_type. Check that pointer and
	const_pointer are gone in C++20.

(cherry picked from commit 5e3a1ea3d8)
2021-05-11 20:50:09 +01:00
..
pb_ds libstdc++: Fix null dereference in pb_ds containers 2021-05-06 14:05:34 +01:00
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
functional
iterator
malloc_allocator.h libstdc++: Fix missing members in std::allocator<void> 2021-05-11 20:50:09 +01:00
memory
mt_allocator.h
new_allocator.h libstdc++: Fix missing members in std::allocator<void> 2021-05-11 20:50:09 +01:00
numeric
numeric_traits.h
pod_char_traits.h
pointer.h
pool_allocator.h
random
random.tcc
rb_tree
rc_string_base.h
rope
ropeimpl.h
slist
sso_string_base.h
stdio_filebuf.h
stdio_sync_filebuf.h
string_conversions.h
throw_allocator.h
type_traits.h
typelist.h
vstring_fwd.h
vstring_util.h
vstring.h
vstring.tcc