Created on 2021-04-20.00:00:00 last changed 2 months ago
This wording is relative to N4885.
Modify [pointer.traits.types] as indicated:
As additional drive-by fix the improper usage of the term "instantiation" has been corrected.
using element_type = see below;
-1- Type: Ptr::element_type if the qualified-id Ptr::element_type is valid and denotes a type ([temp.deduct]); otherwise, T if Ptr is a class template
instantiationof the form SomePointer<T, Args>, where Args is zero or more type arguments; otherwise, the specialization is ill-formed.
[ 2022-02-22 LEWG telecon; Status changed: LEWG → Open ]
No objection to unanimous consent for Jonathan's suggestion to make
pointer_traits an empty class when there is no
element_type. Jonathan to provide a paper.
[ 2022-01-29; Daniel comments ]
This issue has some overlap with LWG 3665 in regard to the question how we should handle the rebind_alloc member template of the allocator_traits template as specified by [allocator.traits.types]/11. It would seem preferable to decide for the same approach in both cases.
[ 2021-05-10; Reflector poll ]
Priority set to 2. Send to LEWG.
Daniel: "there is no similar treatment for the
template and I think it should be clarified whether
signature should exist and in which form in the offending case."
P1474R1 chose to use std::to_address (a mechanism of converting pointer-like types to raw pointers) for contiguous iterators. std::to_address provides an optional customization point via an optional member in std::pointer_traits. However all iterators are not pointers, and the primary template of std::pointer_traits<Ptr> requires that either Ptr::element_type is valid or Ptr is of the form template<T, Args...> or the pointer_traits specialization is ill-formed. This requires specializing pointer_traits for those contiguous iterator types which is inconvenient for users. P1474 should have also made pointer_traits SFINAE friendly.
|2022-02-23 11:11:18||admin||set||messages: + msg12383|
|2022-02-23 11:11:18||admin||set||status: lewg -> open|
|2022-01-29 12:13:52||admin||set||messages: + msg12283|
|2021-11-15 13:29:10||admin||set||status: new -> lewg|
|2021-05-10 16:30:18||admin||set||messages: + msg11798|
|2021-04-24 17:24:50||admin||set||messages: + msg11787|