Skip to content

Commit 38dfe3d

Browse files
frederick-vs-jatkoeppe
authored andcommitted
[dcl.init.ref] Clarify "related type"
"Related type" is not a term, "reference-related type" is clearer.
1 parent f5fdfe4 commit 38dfe3d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/declarations.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -5721,9 +5721,10 @@
57215721
const int& r3 = a; // error: cv-qualifier dropped
57225722
// from result of conversion function
57235723
double d2 = 1.0;
5724-
double&& rrd2 = d2; // error: initializer is lvalue of related type
5724+
double&& rrd2 = d2; // error: initializer is lvalue of reference-related type
57255725
struct X { operator int&(); };
5726-
int&& rri2 = X(); // error: result of conversion function is lvalue of related type
5726+
int&& rri2 = X(); // error: result of conversion function is
5727+
// lvalue of reference-related type
57275728
int i3 = 2;
57285729
double&& rrd3 = i3; // \tcode{rrd3} refers to temporary with value \tcode{2.0}
57295730
\end{codeblock}

0 commit comments

Comments
 (0)