This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-09-28


3055. Misleading body for surrogate call function

Section: 12.2.2.2.3  [over.call.object]     Status: open     Submitter: Brian Bi     Date: 2025-08-11

(From submission #747.)

Subclause 12.2.2.2.3 [over.call.object] paragraph 2 defines the surrogate call function has having a function body. However, this body will never be evaluated, because 12.4.4 [over.call] paragraph 1 specifies the behavior when a surrogate call function is selected by overload resolution.

Suggested resolution:

Change in 12.2.2.2.3 [over.call.object] paragraph 2 as follows:

..., a surrogate call function with the unique name call-function and having the form
    R call-function ( conversion-type-id F, P1 a1, ... , Pn an) { return F (a1, ..., an); } ;
is also considered as a candidate function. [ Note: If a surrogate call function is selected by overload resolution, the behavior is as described in 12.4.4 [over.call]. -- end note ] Similarly,...