Skip to content

Commit 067ddaa

Browse files
jensmaurerzygoloid
authored andcommitted
[over.match.copy,over.match.conv] Clarify candidate function selection for references.
1 parent ddab7e5 commit 067ddaa

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

source/compatibility.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@
281281
\change The result of a conditional expression, an assignment expression, or a comma expression may be an lvalue.
282282
\rationale
283283
\Cpp{} is an object-oriented language, placing relatively
284-
more emphasis on lvalues. For example, functions may
285-
return lvalues.
284+
more emphasis on lvalues. For example, function calls may
285+
yield lvalues.
286286
\effect
287287
Change to semantics of well-defined feature. Some C
288288
expressions that implicitly rely on lvalue-to-rvalue

source/overloading.tex

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,15 +1271,10 @@
12711271
\tcode{T}
12721272
or is a derived class thereof
12731273
are candidate functions.
1274-
Conversion functions that return ``reference to
1275-
\tcode{X}''
1276-
return
1277-
lvalues or xvalues, depending on the type of reference, of type
1278-
\tcode{X}
1279-
and are therefore considered to yield
1280-
\tcode{X}
1281-
for this
1282-
process of selecting candidate functions.
1274+
A call to a conversion function returning ``reference to \tcode{X}''
1275+
is a glvalue of type \tcode{X}, and such a conversion function is
1276+
therefore considered to yield \tcode{X} for this process of selecting
1277+
candidate functions.
12831278
\end{itemize}
12841279

12851280
\pnum
@@ -1330,17 +1325,10 @@
13301325
Conversion functions that return a cv-qualified type
13311326
are considered to yield the cv-unqualified version of that type
13321327
for this process of selecting candidate functions.
1333-
Conversion functions that return ``reference to
1334-
\cvqual{cv2}
1335-
\tcode{X}''
1336-
return
1337-
lvalues or xvalues, depending on the type of reference, of type
1338-
``\cvqual{cv2}
1339-
\tcode{X}''
1340-
and are therefore considered to yield
1341-
\tcode{X}
1342-
for this
1343-
process of selecting candidate functions.
1328+
A call to a conversion function returning ``reference to \tcode{X}''
1329+
is a glvalue of type \tcode{X}, and such a conversion function is
1330+
therefore considered to yield \tcode{X} for this process of selecting
1331+
candidate functions.
13441332
\end{itemize}
13451333

13461334
\pnum

0 commit comments

Comments
 (0)