Skip to content

[expr.ref]/(6.3.2) function type spelling doesn't match [dcl.fct]/1 #3607

@languagelawyer

Description

@languagelawyer

[expr.ref]/(6.3.2) says:

Otherwise, if E1.E2 refers to a non-static member function and the type of E2 is “function of parameter-type-list cv ref-qualifieropt returning T”… The type of E1.E2 is “function of parameter-type-list cv returning T”.

However, this doesn't match how function types are spelled in [dcl.fct]/1:

… the type of the declarator-id in D is “derived-declarator-type-list noexceptopt function of (parameter-declaration-clause) cv-qualifier-seqopt ref-qualifieropt returning T” …

[expr.ref]/(6.3.2):

  • uses cv instead of cv-qualifier-seqopt
  • uses "parameter-type-list" instead of "(parameter-declaration-clause)"
  • misses noexceptopt

Also, why ref-qualifieropt ofE2's type is missing in the type of E1.E2?

Metadata

Metadata

Assignees

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