Created on 2019-11-06.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4835.
Modify [allocator.uses.construction] as indicated:
template<class T, class Alloc, class... Args> constexpr T* uninitialized_construct_using_allocator(T* p, const Alloc& alloc, Args&&... args);-17- Effects: Equivalent to:
return::new(static_cast<void*>(p)) T(make_obj_using_allocator<T>(apply([&](auto&&...xs) { return construct_at(p, std::forward<decltype(xs)>(xs)...); }, uses_allocator_construction_args<T>(alloc, std::forward<Args>(args)...));
[ 2019-11 Status to Ready during Wednesday night issue processing in Belfast. ]
Addresses US 213
uninitialized_construct_using_allocator should use construct_at instead of operator new
Proposed change:Effects: Equivalent to:
return::new(static_cast<void*>(p))construct_at(p,T(make_obj_using_allocator<T>(alloc, std::forward<Args>(args)...)));
Tim Song:
The proposed wording in the NB comment is incorrect, because it prevents guaranteed elision.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: voting -> wp |
2020-01-17 04:54:50 | admin | set | status: ready -> voting |
2019-11-07 08:02:35 | admin | set | messages: + msg10772 |
2019-11-07 08:02:35 | admin | set | status: new -> ready |
2019-11-06 19:04:02 | admin | set | messages: + msg10758 |
2019-11-06 00:00:00 | admin | create |