This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115f. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-06
[Accepted as a DR at the February, 2019 meeting.]
Issue 349 resulted in the following specification in 13.10.3.4 [temp.deduct.conv] paragraph 7:
When the deduction process requires a qualification conversion for a pointer or pointer-to-member type as described above, the following process is used to determine the deduced template argument values: If A is a type
cv1,0 “pointer to...” cv1,n-1 “pointer to” cv1,n T1
and P is a type
cv2,0 “pointer to...” cv2,n-1 “pointer to” cv2,n T2
then the cv-unqualified T1 and T2 are used as the types of A and P respectively for type deduction. [Example:
struct A { template <class T> operator T***(); }; A a; const int * const * const * p1 = a; // T is deduced as int, not const int—end example]
This rule is not widely implemented and may not be desirable. Should it be removed?
Proposed resolutions (December, 2018):
Delete 13.10.3.4 [temp.deduct.conv] paragraph 7:
When the deduction process requires a qualification conversion for a pointer or pointer-to-member type as described above, the following process is used to determine the deduced template argument values: If A is a type
cv1,0 “pointer to...” cv1,n-1 “pointer to” cv1,n T1
and P is a type
cv2,0 “pointer to...” cv2,n-1 “pointer to” cv2,n T2
then the cv-unqualified T1 and T2 are used as the types of A and P respectively for type deduction. [Example:struct A { template <class T> operator T***(); }; A a; const int * const * const * p1 = a; // T is deduced as int, not const int
—end example]