Skip to content

Commit 711aa64

Browse files
jensmaurertkoeppe
authored andcommitted
[std] Harmonize 'reference binds to an expression' phrasing
1 parent 6847238 commit 711aa64

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

source/basic.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4272,8 +4272,7 @@
42724272
sequenced before the construction of the next array element, if any.
42734273

42744274
\pnum
4275-
The third context is when a reference is bound to a
4276-
temporary object.
4275+
The third context is when a reference binds to a temporary object.
42774276
\begin{footnote}
42784277
The same rules apply to initialization of an
42794278
\tcode{initializer_list} object\iref{dcl.init.list} with its

source/classes.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,8 +2824,7 @@
28242824
\indextext{restriction!bit-field}%
28252825
\indextext{restriction!address of bit-field}%
28262826
\indextext{restriction!pointer to bit-field}%
2827-
A non-const reference shall not be bound to a
2828-
bit-field\iref{dcl.init.ref}.
2827+
A non-const reference shall not bind to a bit-field\iref{dcl.init.ref}.
28292828
\begin{note}
28302829
If the initializer for a reference of type \keyword{const} \tcode{T\&} is
28312830
an lvalue that refers to a bit-field, the reference is bound to a

source/declarations.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5424,7 +5424,7 @@
54245424
functions\iref{over.match.ref} and choosing the best one through overload
54255425
resolution\iref{over.match}),
54265426
\end{itemize}
5427-
then the reference is bound to the initializer expression lvalue in the
5427+
then the reference binds to the initializer expression lvalue in the
54285428
first case and to the lvalue result of the conversion
54295429
in the second case (or, in either case, to the appropriate base class subobject of the object).
54305430
\begin{note}
@@ -5481,24 +5481,24 @@
54815481
its type \tcode{T4} is adjusted to type ``\cvqual{cv1} \tcode{T4}''\iref{conv.qual}
54825482
and the temporary materialization conversion\iref{conv.rval} is applied.
54835483
In any case,
5484-
the reference is bound to the resulting glvalue
5484+
the reference binds to the resulting glvalue
54855485
(or to an appropriate base class subobject).
54865486

54875487
\begin{example}
54885488
\begin{codeblock}
54895489
struct A { };
54905490
struct B : A { } b;
54915491
extern B f();
5492-
const A& rca2 = f(); // bound to the \tcode{A} subobject of the \tcode{B} rvalue.
5492+
const A& rca2 = f(); // binds to the \tcode{A} subobject of the \tcode{B} rvalue.
54935493
A&& rra = f(); // same as above
54945494
struct X {
54955495
operator B();
54965496
operator int&();
54975497
} x;
5498-
const A& r = x; // bound to the \tcode{A} subobject of the result of the conversion
5498+
const A& r = x; // binds to the \tcode{A} subobject of the result of the conversion
54995499
int i2 = 42;
5500-
int&& rri = static_cast<int&&>(i2); // bound directly to \tcode{i2}
5501-
B&& rrb = x; // bound directly to the result of \tcode{operator B}
5500+
int&& rri = static_cast<int&&>(i2); // binds directly to \tcode{i2}
5501+
B&& rrb = x; // binds directly to the result of \tcode{operator B}
55025502
\end{codeblock}
55035503
\end{example}
55045504

source/lib-intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2797,7 +2797,7 @@
27972797
pointer did point to the first element of such an array) are in fact valid.
27982798

27992799
\item
2800-
If a function argument binds to an rvalue reference parameter, the implementation may
2800+
If a function argument is bound to an rvalue reference parameter, the implementation may
28012801
assume that this parameter is a unique reference to this argument,
28022802
except that the argument passed to a move-assignment operator may be
28032803
a reference to \tcode{*this}\iref{lib.types.movedfrom}.

source/overloading.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,8 +1510,8 @@
15101510
\tcode{F}.
15111511
If the parameter has reference type, the implicit conversion sequence
15121512
includes the operation of binding the reference, and the fact that
1513-
an lvalue reference to non-\keyword{const} cannot be bound to an rvalue
1514-
and that an rvalue reference cannot be bound to an lvalue
1513+
an lvalue reference to non-\keyword{const} cannot bind to an rvalue
1514+
and that an rvalue reference cannot bind to an lvalue
15151515
can affect
15161516
the viability of the function (see~\ref{over.ics.ref}).
15171517

source/templates.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@
427427
&x; // OK
428428
&i; // error: address of non-reference template-parameter
429429
&a; // OK
430-
int& ri = i; // error: non-const reference bound to temporary
431-
const int& cri = i; // OK: const reference bound to temporary
432-
const A& ra = a; // OK: const reference bound to a template parameter object
430+
int& ri = i; // error: attempt to bind non-const reference to temporary
431+
const int& cri = i; // OK: const reference binds to temporary
432+
const A& ra = a; // OK: const reference binds to a template parameter object
433433
}
434434
\end{codeblock}
435435
\end{example}

0 commit comments

Comments
 (0)