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


1151. Overload resolution with initializer-list and non-list constructors

Section:  [over.match.list]     Status: C++11     Submitter: US     Date: 2010-08-03

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

N3092 comment US 66

Overload resolution should first look for a viable list constructor, then look for a non-list constructor if no list constructor is viable.

Proposed resolution (August, 2010) [SUPERSEDED]:

  1. Change 9.4.5 [dcl.init.list] bullet 3.5 as follows:

  2. Change [over.match.list] as follows:

  3. When objects of non-aggregate class type T are list-initialized (9.4.5 [dcl.init.list]), overload resolution selects the constructor in two phases as follows, where T is the cv-unqualified class type of the object being initialized:

    For In copy-list-initialization, the candidate functions are all the constructors of T. However, if an explicit constructor is chosen, the initialization is ill-formed. [Note: This differs from other situations ( [over.match.ctor], [over.match.copy]), where only converting constructors are considered for copy-initialization. This restriction only applies if this initialization is part of the final result of overload resolution.end note]