Created on 2018-06-04.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4750.
[Drafting note: The subclause only uses OUTERMOST_ALLOC_TRAITS(*this) and only in non-const member functions, so the result is also non-const. Thus, remove_reference_t is sufficient; there's no need to further remove cv-qualification. — end drafting note]
Modify [allocator.adaptor.members]p1 as indicated:
-1- In the construct member functions, OUTERMOST(x) is
x if x does not have an outer_allocator() member function andOUTERMOST(x.outer_allocator()) if the expression x.outer_allocator() is valid ([temp.deduct]) and x otherwise; OUTERMOST_ALLOC_TRAITS(x) is allocator_traits<remove_reference_t<decltype(OUTERMOST(x))>>. [Note: […] — end note]
[ 2018-11, Adopted in San Diego ]
[ 2018-06 Rapperswil Thursday issues processing ]
Status to Ready
OUTERMOST_ALLOC_TRAITS(x) is currently defined in [allocator.adaptor.members]p1 as allocator_traits<decltype(OUTERMOST(x))>. However, OUTERMOST(x), as defined and used in this subclause, is an lvalue for which decltype produces an lvalue reference. That referenceness needs to be removed before the type can be used with allocator_traits.
While we are here, the current wording for OUTERMOST uses the imprecise "if x does not have an outer_allocator() member function". What we meant to check is the validity of the expression x.outer_allocator(), not whether x has some (possibly ambiguous and/or inaccessible) member function named outer_allocator.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-11-12 04:39:29 | admin | set | messages: + msg10194 |
2018-11-12 04:39:29 | admin | set | status: voting -> wp |
2018-10-08 05:13:59 | admin | set | status: ready -> voting |
2018-06-12 04:35:59 | admin | set | messages: + msg9913 |
2018-06-12 04:35:59 | admin | set | status: new -> ready |
2018-06-04 20:24:42 | admin | set | messages: + msg9864 |
2018-06-04 00:00:00 | admin | create |