Skip to content

[expr.prim.id.unqual]/15 Could a variable be an object / reference? #9286

Description

@BlowingWind314

The variable / object distinction becomes confusing in [expr.prim.id.unqual]/15

An implicitly movable entity is a variable with automatic storage duration that is either a non-volatile object or an rvalue reference to a non-volatile object type.

How can a variable BE an object or reference? Isn't it just

... a variable with automatic storage duration that iswhose declaration declares either a non-volatile object or an rvalue reference to a non-volatile object type.

See [basic.pre]/7

A variable is introduced by the declaration D of

  • a reference other than a non-static data member or
  • an object,

where D is not the parameter-declaration of a template-parameter.

It's unclear whether the variable introduced by D is a reference or object, respectively, or these terms are distinct, associated with the same D only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions