-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Full name of submitter: Brian Bi
Issue description: [over.call.object]/2 defines a surrogate call function as having the body { return F(a_1, ..., a_n); }
. Such a body will be ill-formed if any of the parameter types are non-copyable, but will never be evaluated because [over.call]/1 specifies the behavior when a surrogate call function is selected by overload resolution.
Suggested resolution: Edit [over.call.object]/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 [over.call]. —end note]
Similarly, surrogate call functions are added to the set of candidate functions for each non-explicit conversion function declared in a base class [...]