The recent C++20 changes to remove the std::allocator<void> explicit specialization and the destructor in the std::allocator primary template change the result of some is_trivially_xxx type traits. To avoid those changes, this patch restores the explicit specialization and the destructor. In order to meet the C++20 requirements the std::allocator<void> explicit specialization must provide the same interface as the primary template (except for the unusable allocate and deallocate member functions) and the destructor in the primary template must be constexpr. * include/bits/allocator.h (allocator<void>): Restore the explicit specialization for C++20, but make its API consistent with the primary template. (allocator::~allocator()): Restore the destructor for C++20, but make it constexpr. * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>. * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise. * testsuite/20_util/allocator/void.cc: Check that constructors and destructors are trivial. Check for converting constructor in C++20. * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify dejagnu target selector. * testsuite/ext/new_allocator/variadic_construct.cc: Likewise. From-SVN: r277410
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bitmap_allocator | Loading commit data... | |
char8_t | Loading commit data... | |
codecvt | Loading commit data... | |
concurrence_lock_error | Loading commit data... | |
concurrence_unlock_error | Loading commit data... | |
debug_allocator | Loading commit data... | |
enc_filebuf | Loading commit data... | |
ext_pointer | Loading commit data... | |
forced_error | Loading commit data... | |
iota | Loading commit data... | |
is_heap | Loading commit data... | |
is_sorted | Loading commit data... | |
malloc_allocator | Loading commit data... | |
mt_allocator | Loading commit data... | |
new_allocator | Loading commit data... | |
numeric_traits | Loading commit data... | |
pb_ds | Loading commit data... | |
pool_allocator | Loading commit data... | |
random | Loading commit data... | |
rope | Loading commit data... | |
shared_ptr | Loading commit data... | |
slist | Loading commit data... | |
special_functions | Loading commit data... | |
stdio_filebuf | Loading commit data... | |
stdio_sync_filebuf | Loading commit data... | |
throw_allocator | Loading commit data... | |
throw_value | Loading commit data... | |
type_traits | Loading commit data... | |
vstring | Loading commit data... | |
concept_checks.cc | Loading commit data... | |
headers.cc | Loading commit data... | |
median.cc | Loading commit data... | |
pod_char_traits.cc | Loading commit data... |