This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Voted into WP at July, 2009 meeting.]
We need another bullet in 12.2.4.3 [over.ics.rank], along the lines of:
List-initialization sequence L1 is a better conversion sequence than list-initialization sequence L2 if L1 converts to std::initializer_list<X> for some X and L2 does not.
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 12.2.4.3 [over.ics.rank] paragraph 3: