Andrew Tomazos
Andrew Tomazos

Reputation: 68728

C++11 prvalue id-expression?

In C++11 5.1 Primary Expressions it states:

The type of [an id-expression] is the type of the identifier. The result is the entity denoted by the identifier. The result is an lvalue if the entity is a function, variable, or data member and a prvalue otherwise.

What is an example of an id-expression that is a prvalue?

(That is, what is an example of an id-expression that refers to an entity that is not a function, not a variable and not a data member?)

Upvotes: 2

Views: 395

Answers (1)

Igor Tandetnik
Igor Tandetnik

Reputation: 52621

It could be an enumerator. ...

Upvotes: 5

Related Questions