invocation type of method reference declaration

Rafkind, Jon jon.rafkind at hp.com
Wed Feb 12 17:00:09 PST 2014


What is the invocation type of the compile-time chosen method
declaration of a method reference?

In section 15.3.2:
The return type of the function type is R; the result of applying
capture conversion (5.1.10) to the return type of the invocation type
(15.12.2.6) of the chosen declaration is R', where R is the target type
that may be used to infer R'; neither R nor R' is void; and R' is
compatible with R in an assignment context.

Also in section 18.2.1.2:
Otherwise, let R be the return type of the function type, and let R' be
the result of applying capture conversion (5.1.10) to the return type of
the invocation type (15.12.2.6) of the chosen declaration. If R' is
void, the constraint reduces to false; otherwise, the constraint reduces
to ⟨R' → R⟩.

A method reference is not the same as a method invocation so 15.12.2.6
don't seem to apply. Are the parameters of the function type supposed to
act as the types of the argument expressions to the compile-time
declaration?


More information about the lambda-spec-observers mailing list