aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/span
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-12-11 10:44:33 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2024-12-11 21:46:20 +0000
commit2835bd76c1eabc8b5379aaec0d6190f14f62d5be (patch)
treeee4efe2de04e01d92c2fa80843dfd70598b596a1 /libstdc++-v3/include/std/span
parentfca0ab08cd936464b152e9b45356f625eba27575 (diff)
downloadgcc-2835bd76c1eabc8b5379aaec0d6190f14f62d5be.zip
gcc-2835bd76c1eabc8b5379aaec0d6190f14f62d5be.tar.gz
gcc-2835bd76c1eabc8b5379aaec0d6190f14f62d5be.tar.bz2
libstdc++: Remove constraints on std::generator::promise_type::operator new
This was approved in Wrocław as LWG 3900, so that passing an incorrect argument intended as an allocator will be ill-formed, instead of silently ignored. This also renames the template parameters and function parameters for the allocators, to align with the names in the standard. I found it too confusing to have a parameter _Alloc which doesn't correspond to Alloc in the standard. Rename _Alloc to _Allocator (which the standard calls Allocator) and rename _Na to _Alloc (which the standard calls Alloc). libstdc++-v3/ChangeLog: * include/std/generator (_Promise_alloc): Rename template parameter. Use __alloc_rebind to rebind allocator. (_Promise_alloc::operator new): Replace constraints with a static_assert in the body. Rename allocator parameter. (_Promise_alloc<void>::_M_allocate): Rename allocator parameter. Use __alloc_rebind to rebind allocator. (_Promise_alloc<void>::operator new): Rename allocator parameter. * testsuite/24_iterators/range_generators/alloc.cc: New test. * testsuite/24_iterators/range_generators/lwg3900.cc: New test. Reviewed-by: Arsen Arsenović <arsen@aarsen.me>
Diffstat (limited to 'libstdc++-v3/include/std/span')
0 files changed, 0 insertions, 0 deletions