File tree Expand file tree Collapse file tree 6 files changed +14
-16
lines changed Expand file tree Collapse file tree 6 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 4272
4272
sequenced before the construction of the next array element, if any.
4273
4273
4274
4274
\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.
4277
4276
\begin {footnote }
4278
4277
The same rules apply to initialization of an
4279
4278
\tcode {initializer_list} object\iref {dcl.init.list } with its
Original file line number Diff line number Diff line change 2824
2824
\indextext {restriction!bit-field}%
2825
2825
\indextext {restriction!address of bit-field}%
2826
2826
\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 }.
2829
2828
\begin {note }
2830
2829
If the initializer for a reference of type \keyword {const} \tcode {T\& } is
2831
2830
an lvalue that refers to a bit-field, the reference is bound to a
Original file line number Diff line number Diff line change 5424
5424
functions\iref {over.match.ref } and choosing the best one through overload
5425
5425
resolution\iref {over.match }),
5426
5426
\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
5428
5428
first case and to the lvalue result of the conversion
5429
5429
in the second case (or, in either case, to the appropriate base class subobject of the object).
5430
5430
\begin {note }
5481
5481
its type \tcode {T4} is adjusted to type `` \cvqual {cv1} \tcode {T4}'' \iref {conv.qual }
5482
5482
and the temporary materialization conversion\iref {conv.rval } is applied.
5483
5483
In any case,
5484
- the reference is bound to the resulting glvalue
5484
+ the reference binds to the resulting glvalue
5485
5485
(or to an appropriate base class subobject).
5486
5486
5487
5487
\begin {example }
5488
5488
\begin {codeblock }
5489
5489
struct A { };
5490
5490
struct B : A { } b;
5491
5491
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.
5493
5493
A&& rra = f(); // same as above
5494
5494
struct X {
5495
5495
operator B();
5496
5496
operator int&();
5497
5497
} 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
5499
5499
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}
5502
5502
\end {codeblock }
5503
5503
\end {example }
5504
5504
Original file line number Diff line number Diff line change 2797
2797
pointer did point to the first element of such an array) are in fact valid.
2798
2798
2799
2799
\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
2801
2801
assume that this parameter is a unique reference to this argument,
2802
2802
except that the argument passed to a move-assignment operator may be
2803
2803
a reference to \tcode {*this}\iref {lib.types.movedfrom }.
Original file line number Diff line number Diff line change 1510
1510
\tcode {F}.
1511
1511
If the parameter has reference type, the implicit conversion sequence
1512
1512
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
1515
1515
can affect
1516
1516
the viability of the function (see~\ref {over.ics.ref }).
1517
1517
Original file line number Diff line number Diff line change 427
427
&x; // OK
428
428
&i; // error: address of non-reference template-parameter
429
429
&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
433
433
}
434
434
\end {codeblock }
435
435
\end {example }
You can’t perform that action at this time.
0 commit comments