This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See for the official list.


1589. Ambiguous ranking of list-initialization sequences

Section:  [over.ics.rank]     Status: CD4     Submitter: Johannes Schaub     Date: 2012-11-21

[Moved to DR at the November, 2014 meeting.]

The interpretation of the following example is unclear in the current wording:

   void f(long);
   void f(initializer_list<int>);
   int main() { f({1L});

The problem is that a list-initialization sequence can also be a standard conversion sequence, depending on the types of the elements and the type of the parameter, so more than one bullet in the list in [over.ics.rank] paragraph 3 applies:

Two implicit conversion sequences of the same form are indistinguishable conversion sequences unless one of the following rules applies:

These bullets give opposite results for the example above, and there is implementation variance in which is selected.

Notes from the April, 2013 meeting:

CWG determined that the latter bullet should apply only if the first one does not.

Proposed resolution (June, 2014):

This issue is resolved by the resolution of issue 1467.