cplusplus / cplusplus/draft

[dcl.init.ref] References are bound to objects and functions, not expressions

Open
#2,855 4 comments 0 reactions 1 assignee View on GitHub

@sdkrystian is already working on this.

Since May 2, 2019.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

There are several occurrences in the wording saying that references are bound to expressions, which is incorrect:

[dcl.init.ref]/5.1 sentence 1

[...] the reference is bound to the initializer expression lvalue in the first case and to the lvalue result of the conversion in the second case

[dcl.init.ref]/5.3 sentence 3

[...] the reference is bound to the resulting glvalue

[dcl.init.ref]/5.4.2

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.