By trying to reuse the existing std::_Construct function as a wrapper for std::construct_at I introduced regressions, because changing std::_Construct to return non-void made it ill-formed for array types. The solution is to revert _Construct to its former state, and change allocator_traits::construct to explicitly call construct_at instead. This decouples all the existing callers of _Construct from the new construct_at requirements. PR libstdc++/94831 * include/bits/alloc_traits.h (_S_construct): Restore placement new-expression for C++11/14/17 and call std::construct_at directly for C++20. * include/bits/stl_construct.h (_Construct): Revert to non-constexpr function returning void. * testsuite/20_util/specialized_algorithms/ uninitialized_value_construct/94831.cc: New test. * testsuite/23_containers/vector/cons/94831.cc: New test.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
allocator | Loading commit data... | |
bool | Loading commit data... | |
capacity | Loading commit data... | |
cons | Loading commit data... | |
data_access | Loading commit data... | |
debug | Loading commit data... | |
element_access | Loading commit data... | |
ext_pointer | Loading commit data... | |
modifiers | Loading commit data... | |
profile | Loading commit data... | |
requirements | Loading commit data... | |
types | Loading commit data... | |
14340.cc | Loading commit data... | |
15523.cc | Loading commit data... | |
18604.cc | Loading commit data... | |
26412-1.cc | Loading commit data... | |
26412-2.cc | Loading commit data... | |
40192.cc | Loading commit data... | |
48101-2_neg.cc | Loading commit data... | |
48101-3_neg.cc | Loading commit data... | |
48101_neg.cc | Loading commit data... | |
52591.cc | Loading commit data... | |
58764.cc | Loading commit data... | |
59829.cc | Loading commit data... | |
63500.cc | Loading commit data... | |
92124.cc | Loading commit data... | |
check_construct_destroy.cc | Loading commit data... | |
cmp_c++20.cc | Loading commit data... | |
debug_mode_requires_reallocation-1.cc | Loading commit data... | |
debug_mode_requires_reallocation-2.cc | Loading commit data... | |
erasure.cc | Loading commit data... | |
init-list.cc | Loading commit data... | |
pmr_typedefs.cc | Loading commit data... | |
range_access.cc | Loading commit data... | |
zero_sized_allocations.cc | Loading commit data... |