gcc/libstdc++-v3/include/ext
Jonathan Wakely fe9571a35d libstdc++: Fix non-reserved name in std::allocator base class [PR64135]
The possible base classes of std::allocator are new_allocator and
malloc_allocator, which both cause a non-reserved name to be declared in
every program that includes the definition of std::allocator. This is
non-conforming.

This change replaces __gnu_cxx::new_allocator with std::__new_allocator
which is identical except for using a reserved name. The non-standard
extension __gnu_cxx::new_allocator is preserved as a thin wrapper over
std::__new_allocator. There is no problem with the extension using a
non-reserved name now that it's not included by default in other
headers.

The same change could be done to __gnu_cxx::malloc_allocator but as it's
not the default configuration it can wait.

libstdc++-v3/ChangeLog:

	PR libstdc++/64135
	* config/allocator/new_allocator_base.h: Include
	<bits/new_allocator.h> instead of <ext/new_allocator.h>.
	(__allocator_base): Use std::__new_allocator instead of
	__gnu_cxx::new_allocator.
	* doc/xml/manual/allocator.xml: Document new default base class
	for std::allocator.
	* doc/xml/manual/evolution.xml: Likewise.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add bits/new_allocator.h.
	* include/Makefile.in: Regenerate.
	* include/experimental/memory_resource (new_delete_resource):
	Use std::__new_allocator instead of __gnu_cxx::new_allocator.
	* include/ext/new_allocator.h (new_allocator): Derive from
	std::__new_allocator. Move implementation to ...
	* include/bits/new_allocator.h: New file.
	* testsuite/20_util/allocator/64135.cc: New test.
2021-12-09 22:50:10 +00:00
..
pb_ds libstdc++: Fix null dereference in pb_ds containers 2021-05-04 22:34:20 +01:00
algorithm Update copyright years. 2021-01-04 10:26:59 +01:00
aligned_buffer.h Update copyright years. 2021-01-04 10:26:59 +01:00
alloc_traits.h Update copyright years. 2021-01-04 10:26:59 +01:00
atomicity.h Update copyright years. 2021-01-04 10:26:59 +01:00
bitmap_allocator.h libstdc++: Fix circular dependency for bitmap_allocator [PR103381] 2021-11-23 12:30:57 +00:00
cast.h Update copyright years. 2021-01-04 10:26:59 +01:00
cmath Update copyright years. 2021-01-04 10:26:59 +01:00
codecvt_specializations.h Update copyright years. 2021-01-04 10:26:59 +01:00
concurrence.h Update copyright years. 2021-01-04 10:26:59 +01:00
debug_allocator.h Update copyright years. 2021-01-04 10:26:59 +01:00
enc_filebuf.h Update copyright years. 2021-01-04 10:26:59 +01:00
extptr_allocator.h libstdc++: Fix std::allocator<void> for versioned namespace 2021-08-28 14:37:19 +01:00
functional Update copyright years. 2021-01-04 10:26:59 +01:00
iterator Update copyright years. 2021-01-04 10:26:59 +01:00
malloc_allocator.h libstdc++: Fix missing members in std::allocator<void> 2021-05-11 16:11:01 +01:00
memory Update copyright years. 2021-01-04 10:26:59 +01:00
mt_allocator.h Update copyright years. 2021-01-04 10:26:59 +01:00
new_allocator.h libstdc++: Fix non-reserved name in std::allocator base class [PR64135] 2021-12-09 22:50:10 +00:00
numeric Update copyright years. 2021-01-04 10:26:59 +01:00
numeric_traits.h libstdc++: Use __extension__ instead of diagnostic pragmas 2021-07-16 15:03:03 +01:00
pod_char_traits.h Update copyright years. 2021-01-04 10:26:59 +01:00
pointer.h Update copyright years. 2021-01-04 10:26:59 +01:00
pool_allocator.h Update copyright years. 2021-01-04 10:26:59 +01:00
random libstdc++: Fix doxygen markup for group close commands 2021-04-06 16:43:24 +01:00
random.tcc Update copyright years. 2021-01-04 10:26:59 +01:00
rb_tree Update copyright years. 2021-01-04 10:26:59 +01:00
rc_string_base.h libstdc++: Enable vstring for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
rope libstdc++: Remove __gnu_cxx::rope::erase(size_type) [PR102048] 2021-08-25 22:28:46 +01:00
ropeimpl.h Update copyright years. 2021-01-04 10:26:59 +01:00
slist Update copyright years. 2021-01-04 10:26:59 +01:00
sso_string_base.h Update copyright years. 2021-01-04 10:26:59 +01:00
stdio_filebuf.h Update copyright years. 2021-01-04 10:26:59 +01:00
stdio_sync_filebuf.h libstdc++: Fix build failure for targets without unistd.h 2021-02-09 12:31:52 +00:00
string_conversions.h Update copyright years. 2021-01-04 10:26:59 +01:00
throw_allocator.h libstdc++: Improvements to Doxygen markup 2021-07-01 18:45:48 +01:00
type_traits.h libstdc++: Implement constexpr std::basic_string for C++20 2021-11-16 16:43:20 +00:00
typelist.h Update copyright years. 2021-01-04 10:26:59 +01:00
vstring_fwd.h libstdc++: Enable vstring for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
vstring_util.h Update copyright years. 2021-01-04 10:26:59 +01:00
vstring.h libstdc++: Begin lifetime of chars in constexpr std::string [PR103295] 2021-11-19 18:15:15 +00:00
vstring.tcc Update copyright years. 2021-01-04 10:26:59 +01:00