cplusplus / CWG

Core Working Group
23 stars 7 forks source link

[intro.defs] Adding definition for the term function lvalue #469

Closed ranaanoop closed 2 months ago

ranaanoop commented 7 months ago

Full name of submitter: Anoop Rana

Reference (section label): [intro.defs]

Issue description: The standard uses the term "function lvalue" at multiple places but doesn't have a formal definition for the same. Here are 5 occurrences for the same:

Two references in dcl.init One reference in over.ics.ref Two references in over.ics.rank

Suggested resolution:

Add a definition for the same in [intro.defs] saying something like:

function lvalue an lvalue expression of a function type

frederick-vs-ja commented 7 months ago

The proposed wording looks very asymmetric. If it makes sense to add a particular definition for function lvalue, why don't we define object lvalue (and object xvalue, object prvalue, etc.) together?

jensmaurer commented 7 months ago

I think we should just say "lvalue of function type" ("expression" is implied) wherever we use "function lvalue", instead of trying to define this rather awkward term.