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

2024-11-11


1563. List-initialization and overloaded function disambiguation

Section: 12.3  [over.over]     Status: CD3     Submitter: Daniel Krügler     Date: 2012-10-08

[Moved to DR at the April, 2013 meeting.]

Presumably, 12.3 [over.over] paragraph 1,

A use of an overloaded function name without arguments is resolved in certain contexts to a function, a pointer to function or a pointer to member function for a specific function from the overload set. A function template name is considered to name a set of overloaded functions in such contexts. The function selected is the one whose type is identical to the function type of the target type required in the context. [Note: That is, the class of which the function is a member is ignored when matching a pointer-to-member-function type. —end note] The target can be

should apply to an example like

  double bar(double) { return 0.0; }
  float bar(float) { return 0.0f; }

  using fun = double(double);
  fun &foo{bar};

However, there is implementation variance in whether the use of bar is accepted or not, and the omission of a cross-reference to 9.4.5 [dcl.init.list] might be read as indicating that list-initialization is not included.

Proposed resolution (February, 2013):

Change 12.3 [over.over] paragraph 1 as follows:

...The target can be