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


1079. Overload resolution involving aggregate initialization

Section:  [over.ics.rank]     Status: C++11     Submitter: Jason Merrill     Date: 2010-06-15

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

The current wording makes some calls involving aggregate initialization ambiguous that should not be. For example, the calls below to f and g should each prefer the second overload:

    struct A { int i; };

    void f (const A &);
    void f (A &&);

    void g (A, double);
    void g (A, int);

    int main() {
       f ( { 1 } );
       g ( { 1 }, 1 );

Proposed resolution (August, 2010) [SUPERSEDED]:

Change [over.ics.rank] bullet 3.2 as follows: