You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The temporary materialization conversion is applied and the reference is bound to the result
Obviously, the reference should be bound to the object or function that the expression refers to, so this wording is technically incorrect.
Proposed fix
In each case where a reference is said to bind to an expression, it will be replaced with "the object or reference to which the initializer refers", or a variant thereof.
The text was updated successfully, but these errors were encountered:
sdkrystian
changed the title
[dcl.init.ref] References are bound to entities, not expressions
[dcl.init.ref] References are bound to objects and functions, not expressions
Apr 30, 2019
@cpplearner I understand it as "set to refer to". The standard does use it all over the place when referring to references, so it may be useful to define it.
I think if this is changed as proposed, the definition of "binds directly" should also be changed to be in terms of objects and functions. Just so that if "binds directly to X" is true, then "binds to X" is true aswell.
EDIT: to clarify - we say "the argument expression binds directly" in ranking certain overload resolution scenarios. I don't propose changing any text, just pointing out this.
There are several occurrences in the wording saying that references are bound to expressions, which is incorrect:
[dcl.init.ref]/5.1 sentence 1
[dcl.init.ref]/5.3 sentence 3
[dcl.init.ref]/5.4.2
Obviously, the reference should be bound to the object or function that the expression refers to, so this wording is technically incorrect.
Proposed fix
In each case where a reference is said to bind to an expression, it will be replaced with "the object or reference to which the initializer refers", or a variant thereof.
The text was updated successfully, but these errors were encountered: