gcc/libstdc++-v3/include/ext
Jonathan Wakely f92a504fdd libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190]
std::allocator and std::pmr::polymorphic_allocator should throw
std::bad_array_new_length from their allocate member functions if the
number of bytes required cannot be represented in std::size_t.

libstdc++-v3/ChangeLog:

	* config/abi/pre/gnu.ver: Add new symbol.
	* include/bits/functexcept.h (__throw_bad_array_new_length):
	Declare new function.
	* include/ext/malloc_allocator.h (malloc_allocator::allocate):
	Throw bad_array_new_length for impossible sizes (LWG 3190).
	* include/ext/new_allocator.h (new_allocator::allocate):
	Likewise.
	* include/std/memory_resource (polymorphic_allocator::allocate)
	(polymorphic_allocator::allocate_object): Use new function,
	__throw_bad_array_new_length.
	* src/c++11/functexcept.cc (__throw_bad_array_new_length):
	Define.
	* testsuite/20_util/allocator/lwg3190.cc: New test.
2020-10-05 15:18:56 +01:00
..
pb_ds Update copyright years. 2020-01-01 12:51:42 +01:00
algorithm Update copyright years. 2020-01-01 12:51:42 +01:00
aligned_buffer.h Update copyright years. 2020-01-01 12:51:42 +01:00
alloc_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
atomicity.h libstdc++: Use __libc_single_threaded to optimise atomics [PR 96817] 2020-09-26 20:32:36 +01:00
bitmap_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
cast.h Update copyright years. 2020-01-01 12:51:42 +01:00
cmath Update copyright years. 2020-01-01 12:51:42 +01:00
codecvt_specializations.h Update copyright years. 2020-01-01 12:51:42 +01:00
concurrence.h Update copyright years. 2020-01-01 12:51:42 +01:00
debug_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
enc_filebuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
extptr_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
functional Update copyright years. 2020-01-01 12:51:42 +01:00
iterator Update copyright years. 2020-01-01 12:51:42 +01:00
malloc_allocator.h libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190] 2020-10-05 15:18:56 +01:00
memory Update copyright years. 2020-01-01 12:51:42 +01:00
mt_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
new_allocator.h libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190] 2020-10-05 15:18:56 +01:00
numeric Update copyright years. 2020-01-01 12:51:42 +01:00
numeric_traits.h libstdc++: Make __int128 meet integer-class requirements [PR 96042] 2020-08-19 16:49:07 +01:00
pod_char_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
pointer.h libstdc++: Add comparison operators to sequence containers 2020-04-17 23:41:04 +01:00
pool_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
random Update copyright years. 2020-01-01 12:51:42 +01:00
random.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
rb_tree Update copyright years. 2020-01-01 12:51:42 +01:00
rc_string_base.h Update copyright years. 2020-01-01 12:51:42 +01:00
rope Update copyright years. 2020-01-01 12:51:42 +01:00
ropeimpl.h Update copyright years. 2020-01-01 12:51:42 +01:00
slist Update copyright years. 2020-01-01 12:51:42 +01:00
sso_string_base.h Update copyright years. 2020-01-01 12:51:42 +01:00
stdio_filebuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
stdio_sync_filebuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
string_conversions.h Update copyright years. 2020-01-01 12:51:42 +01:00
throw_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
type_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
typelist.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring_fwd.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring_util.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring.h Update copyright years. 2020-01-01 12:51:42 +01:00
vstring.tcc Update copyright years. 2020-01-01 12:51:42 +01:00