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


702. Preferring conversion to std::initializer_list

Section:  [over.ics.rank]     Status: CD2     Submitter: Jason Merrill     Date: 2 July, 2008

[Voted into WP at July, 2009 meeting.]

We need another bullet in [over.ics.rank], along the lines of:

This is necessary to make the following example work:

    #include <initializer_list>

    struct string {
      string (const char *) {}
      template <class Iter> string (Iter, Iter);

    template <class T, class U>
    struct pair {
      pair (T t, U u) {}

    template<class T, class U>
    struct map {
      void insert (pair<T,U>);
      void insert (std::initializer_list<pair<T,U> >) {}

    int main() {
      map<string,string> m;
      m.insert({ {"this","that"}, {"me","you"} });

Proposed resolution (March, 2009):

Add a new top-level bullet at the end of the current list in [over.ics.rank] paragraph 3: