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


1228. Copy-list-initialization and explicit constructors

Section:  [over.match.list]     Status: NAD     Submitter: Daniel Krügler     Date: 2010-12-03

The rules for selecting candidate functions in copy-list-initialization ( [over.match.list]) differ from those of regular copy-initialization ( [over.match.copy]): the latter specify that only the converting (non-explicit) constructors are considered, while the former include all constructors but state that the program is ill-formed if an explicit constructor is selected by overload resolution. This is counterintuitive and can lead to surprising results. For example, the call to the function object p in the following example is ambiguous because the explicit constructor is a candidate for the initialization of the operator's parameter:

    struct MyList {
      explicit MyStore(int initialCapacity);

    struct MyInt {
      MyInt(int i);

    struct Printer {
      void operator()(MyStore const& s);
      void operator()(MyInt const& i);

    void f() {
      Printer p;

Rationale (March, 2011):

The current rules are as intended.