Created on 2018-07-24.00:00:00 last changed 77 months ago
[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]
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-07-24 00:00:00 | admin | create |