You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
languagelawyer
changed the title
[expr.ref]/(4.3.2) function type spelling doesn't match [dcl.fct]/1
[expr.ref]/(6.3.2) function type spelling doesn't match [dcl.fct]/1
Jan 6, 2020
I agree with most of the suggestions, but the "parameter-type-list" actually better captures the processing that occurs between the parameter-declaration-clause and the resulting types. (Thus, [dcl.fct] should be fixed.)
Oh, and "cv" is an established term for a set of cv-qualifiers, so I think we're good in that regard.
I'm actually wondering about something else: Do we have to include "cv" and "ref-qualifier" in the resulting type for E1.E2? After all, those things only matter when checking the relationship of E1 and E2, but once that has been cleared, they're irrelevant for further processing. The relevant overload resolution section talks about "the non-static member function", so don't actually refer to "E1.E2" which is a funny prvalue invented for recursive parsing mechanics but not much else.
[expr.ref]/(6.3.2) says:
However, this doesn't match how function types are spelled in [dcl.fct]/1:
[expr.ref]/(6.3.2):
noexcept
optAlso, why ref-qualifieropt of
E2
's type is missing in the type ofE1.E2
?The text was updated successfully, but these errors were encountered: