f92a504fdd
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. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |