[Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr
de34 at live dot cn
gcc-bugzilla@gcc.gnu.org
Tue Feb 15 06:36:08 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104542
Bug ID: 104542
Summary: make_obj_using_allocator and
uninitialized_construct_using_allocator lack constexpr
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: de34 at live dot cn
Target Milestone: ---
std::make_obj_using_allocator and std::uninitialized_construct_using_allocator
are constexpr in C++20 (LWG3185, LWG3321), but currently they are not constexpr
in libstdc++.
I think the related compiler support for std::construct_at is available since
gcc11 (partially available in gcc10), so these functions are reasonably
constexpr in libstdc++ now, and this fix should be backported to gcc 10/11.
wandbox links:
gcc10 with manual constexpr (lacks support for CZ044):
https://wandbox.org/permlink/CvSEindXZa3MMRT5
gcc11&12 with manual constexpr:
https://wandbox.org/permlink/8i7oM16jGxlmz3FC
https://wandbox.org/permlink/VHQJhGINcdpNC0Eh
gcc11&12 with std versions, currently doesn't compile:
https://wandbox.org/permlink/ZUx1xZIOphwxcJhS
https://wandbox.org/permlink/f8uujdEoMUPbsUIq
More information about the Gcc-bugs
mailing list