Created on 2012-03-05.00:00:00 last changed 131 months ago
Proposed resolution:
This wording is relative to N3376.
Change Table 27 — "Descriptive variable definitions" in [allocator.requirements]:
Variable | Definition |
---|---|
u |
a value of type |
[ 2013-04-20 Bristol ]
[ 2012-10 Portland: Move to Ready ]
No strong feeling that this is a big issue, but consensus that the proposed resolution is strictly better than the current wording, so move to Ready.
According to Table 28 — "Allocator requirements", the expression
a.allocate(n, u)
expects as second argument a value u that is described in Table 27 as:
a value of type YY::const_pointer obtained by calling YY::allocate, or else nullptr.
This description leaves it open, whether or whether not a value of type YY::const_void_pointer is valid or not. The corresponding wording in C++03 is nearly the same, but in C++03 there did not exist the concept of a general void_pointer for allocators. There is some evidence for support of void pointers because the general allocator_traits template declares
static pointer allocate(Alloc& a, size_type n, const_void_pointer hint);
and the corresponding function for std::allocator<T> is declared as:
pointer allocate(size_type, allocator<void>::const_pointer hint = 0);
As an additional minor wording glitch (especially when comparing with the NullablePointer requirements imposed on const_pointer and const_void_pointer), the wording seems to exclude lvalues of type std::nullptr_t, which looks like an unwanted artifact to me.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2013-04-25 19:07:07 | admin | set | status: voting -> wp |
2013-04-19 22:22:17 | admin | set | messages: + msg6474 |
2013-04-19 22:22:17 | admin | set | status: ready -> voting |
2012-10-16 15:35:12 | admin | set | messages: + msg6171 |
2012-10-16 15:35:12 | admin | set | status: new -> ready |
2012-04-03 16:35:06 | admin | set | messages: + msg6076 |
2012-03-05 00:00:00 | admin | create |