mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
[allocator.members] says that allocator::{,de}allocate should be
constexpr but currently we don't mark them as such. I had to
work around that in the Reflection code, but it would be better to
clean this up. (I see no allocation_result so I'm not changing that.)
gcc/cp/ChangeLog:
* constexpr.cc (is_std_allocator): Don't check for __new_allocator.
(is_std_allocator_allocate): Make static.
* cp-tree.h (is_std_allocator_allocate): Remove declaration.
* reflect.cc (check_out_of_consteval_use): Don't call
is_std_allocator_allocate.
(check_consteval_only_fn): Likewise.
libstdc++-v3/ChangeLog:
* include/bits/new_allocator.h (__new_allocator::allocate,
__new_allocator::deallocate): Add missing constexpr.
Reviewed-by: Jason Merrill <jason@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>