This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-10-26


1372. Cross-references incorrect in conversion function template argument deduction

Section: 13.10.3.4  [temp.deduct.conv]     Status: CD3     Submitter: Michael Wong     Date: 2011-08-15

[Moved to DR at the October, 2012 meeting.]

According to 13.10.3.4 [temp.deduct.conv] paragraph 1,

Template argument deduction is done by comparing the return type of the conversion function template (call it P; see 9.4 [dcl.init], 12.2.2.6 [over.match.conv], and 12.2.2.7 [over.match.ref] for the determination of that type) with the type that is required as the result of the conversion (call it A) as described in 13.10.3.6 [temp.deduct.type].

It would seem that the cross-references should apply to the determination of the type “required as the result of the conversion” (i.e., A) instead of the return type of the conversion function.

Proposed resolution (February, 2012):

Change 13.10.3.4 [temp.deduct.conv] paragraph 1 as follows:

Template argument deduction is done by comparing the return type of the conversion function template (call it P; see 9.4 [dcl.init], 12.2.2.6 [over.match.conv], and 12.2.2.7 [over.match.ref] for the determination of that type) with the type that is required as the result of the conversion (call it A; see 9.4 [dcl.init], 12.2.2.6 [over.match.conv], and 12.2.2.7 [over.match.ref] for the determination of that type) as described in 13.10.3.6 [temp.deduct.type].