This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-08-20
[Moved to DR at the October, 2012 meeting.]
The definition of reference-compatible types in 9.4.4 [dcl.init.ref] paragraph 4 allows the types to differ in top-level cv-qualification, but it does not encompass the deeper added cv-qualification permitted for “similar types” (7.3.6 [conv.qual]). This seems surprising and could lead to errors resulting from the fact that the reference will be bound to a temporary and not to the original object in the initializer.
Proposed resolution (February, 2012):
Change 9.4.4 [dcl.init.ref] paragraph 4 as follows:
Given types “cv1 T1” and “cv2 T2,” “cv1 T1” is reference-related to “cv2 T2” if T1 is the same type as T2, or T1 is a base class of T2. “cv1 T1” is reference-compatible with “cv2 T2” if T1 is reference-related to T2 and cv1 is the same cv-qualification as, or greater cv-qualification than, cv2.For purposes of overload resolution, cases for which cv1 is greater cv-qualification than cv2 are identified as reference-compatible with added qualification (see 12.2.4.3 [over.ics.rank]).In all cases...
Delete 12.2.4.2.5 [over.ics.ref] paragraph 5:
The binding of a reference to an expression that is reference-compatible with added qualification influences the rank of a standard conversion; see 12.2.4.3 [over.ics.rank] and 9.4.4 [dcl.init.ref].
[Drafting note: CWG decided not to make a substantive change for this issue, but the investigation discovered that the term defined by these two citations is not actually used and could be removed.]