Created on 2017-11-15.00:00:00 last changed 12 months ago
Proposed resolution:
Wording relative to N4861.
Strike the declaration of destroy from the synopsis of class polymorphic_allocator in [mem.poly.allocator.class]:
template <class T1, class T2, class U, class V> void construct(pair<T1,T2>* p, pair<U, V>&& pr);template <class T>void destroy(T* p);polymorphic_allocator select_on_container_copy_construction() const;
Adjust the specification of delete_object in [mem.poly.allocator.mem]:
template <class T> void delete_object(T* p);-13- Effects: Equivalent to:
allocator_traits<polymorphic_allocator>::destroy(*this, p); deallocate_object(p);
Strike the specification of destroy in [mem.poly.allocator.mem]:
[…]template <class T>void destroy(T* p);[…]
-17- Effects: As if by p->~T().
Add a new subclause to Annex D:
D.?? Deprecated polymorphic_allocator member function
-1- The following member is declared in addition to those members specified in [mem.poly.allocator.mem]:
namespace std::pmr { template<class Tp = byte> class polymorphic_allocator { public: template <class T> void destroy(T* p); }; }template <class T> void destroy(T* p);-1- Effects: As if by p->~T().
[ 2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP. ]
[ 2020-10-11; Reflector poll ]
Moved to Tentatively Ready after seven votes in favour.
[ 2020-10-05; Jonathan provides new wording ]
Previous resolution [SUPERSEDED]:
Wording relative to N4700.
Strike the declaration of destroy from the synopsis of class polymorphic_allocator in [mem.poly.allocator.class]:
template <class T1, class T2, class U, class V> void construct(pair<T1,T2>* p, pair<U, V>&& pr);template <class T>void destroy(T* p);polymorphic_allocator select_on_container_copy_construction() const;Strike the specification of destroy in [mem.poly.allocator.mem]:
[…]template <class T>void destroy(T* p);[…]
14 Effects: As if by p->~T().
[ 2019-02; Kona Wednesday night issue processing ]
Status to Open; revisit once P0339 lands. Poll taken was 5-3-2 in favor of removal.
[ 28-Nov-2017 Mailing list discussion - set priority to P3 ]
PJ says that Dinkumware is shipping an implementation of polymorphic_allocator with destroy, so removing it would be a breaking change for him.
polymorphic_allocator's member function destroy is exactly equivalent to the default implementation of destroy in allocator_traits ([allocator.traits.members] para 6). It should be struck from polymorphic_allocator as it provides no value.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2020-11-09 21:40:50 | admin | set | messages: + msg11554 |
2020-11-09 21:40:50 | admin | set | status: ready -> wp |
2020-10-11 11:26:29 | admin | set | messages: + msg11513 |
2020-10-11 11:26:29 | admin | set | status: open -> ready |
2020-10-05 11:47:33 | admin | set | messages: + msg11509 |
2019-02-21 17:23:36 | admin | set | messages: + msg10315 |
2019-02-21 17:23:36 | admin | set | status: new -> open |
2017-11-29 03:09:11 | admin | set | messages: + msg9572 |
2017-11-15 17:30:33 | admin | set | messages: + msg9559 |
2017-11-15 00:00:00 | admin | create |