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


2731. List-initialization sequence with a user-defined conversion

Section:  [over.ics.user]     Status: open     Submitter: Brian Bi     Date: 2023-05-11


  struct C {

  struct A {

  struct B {

  int f(const A&);
  int f(B&&);

  int x = f({1});

Subclause [over.ics.user] paragraph 1 specifies:

A user-defined conversion sequence consists of an initial standard conversion sequence followed by a user-defined conversion (11.4.8 [class.conv]) followed by a second standard conversion sequence. If the user-defined conversion is specified by a constructor ( [class.conv.ctor]), the initial standard conversion sequence converts the source type to the type of the first parameter of that constructor. ...

However, there is no "source type" for an initializer list, making the treatment of the example unclear.

Suggested resolution:

Change in [over.ics.list] bullet 7.2 as follows: