aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-05-11 15:01:01 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-05-11 16:11:01 +0100
commit5e3a1ea3d89d62972e1f036b2ede37a80b880bdf (patch)
tree6bc92821a27ae889dcd16099d5dea1cdf9c856ab /gcc/expr.c
parent5ea40269a77a3754dd0f610f7c09b1a372e3c7f7 (diff)
downloadgcc-5e3a1ea3d89d62972e1f036b2ede37a80b880bdf.zip
gcc-5e3a1ea3d89d62972e1f036b2ede37a80b880bdf.tar.gz
gcc-5e3a1ea3d89d62972e1f036b2ede37a80b880bdf.tar.bz2
libstdc++: Fix missing members in std::allocator<void>
The changes in 75c6a925dab5b7af9ab47c10906cb0e140261cc2 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.
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions