Created on 2013-05-14.00:00:00 last changed 89 months ago
Proposed resolution:
Edit Table 28 as indicated:
Table 28 — Allocator requirements (continued) Expression Return type Assertion/note pre-/post-condition Default … static_cast<X::const_pointer>(z) X::const_pointer static_cast<X::const_pointer>(z) == q pointer_traits<X::pointer>::pointer_to(r) X::pointer …
[ 2016-11-12, Issaquah ]
This is related to 1521.
Sat PM: Restore original P/R and move to tentatively ready.
[ 2015-07 Telecon ]
Marshall to ping Pablo for proposed wording and disable current wording.
Previous resolution [SUPERSEDED]:
Edit Table 28 as indicated:
Table 28 — Allocator requirements (continued) Expression Return type Assertion/note pre-/post-condition Default … static_cast<X::const_pointer>(z) X::const_pointer static_cast<X::const_pointer>(z) == q pointer_traits<X::pointer>::pointer_to(r) X::pointer …
[ 2013-09 Chicago ]
Pablo to come back with proposed wording
For an allocator A<T> which defines A<T>::pointer to a class type, i.e. not T*, I see no requirement that A<T>::pointer is convertible to A<U>::pointer, even if T* is convertible to U*. Such conversions are needed in containers to convert from e.g. ListNodeBase* to ListNode<T>*.
The obvious way to do such conversions appears to be pointer_traits::pointer_to(), but that's ill-formed if the static member function A<T>::pointer::pointer_to() doesn't exist and the allocator requirements don't mention that function, so you need to cast A<T>::pointer to A<T>::void_pointer then cast that to A<U>::pointer.
Is converting via void_pointer really intended, or are we missing a requirement that pointer_traits<A<T>::pointer>::pointer_to() be well-formed?
Proposed resolution:
Add to the Allocator requirements table the following requirement:
The expression pointer_traits<XX::pointer>::pointer_to(r) is well-defined.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2017-03-05 23:41:16 | admin | set | status: ready -> wp |
2016-11-21 05:25:40 | admin | set | messages: + msg8676 |
2016-11-21 05:25:40 | admin | set | messages: + msg8675 |
2016-11-21 05:25:40 | admin | set | status: open -> ready |
2014-01-14 19:49:34 | admin | set | messages: + msg6795 |
2014-01-14 19:49:34 | admin | set | status: new -> open |
2013-06-29 15:11:00 | admin | set | messages: + msg6531 |
2013-05-14 00:00:00 | admin | create |