Created on 2008-07-02.00:00:00 last changed 189 months ago
[Voted into WP at July, 2009 meeting.]
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:
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"} });
}
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-03-29 00:00:00 | admin | set | status: wp -> cd2 |
| 2009-11-08 00:00:00 | admin | set | status: dr -> wp |
| 2009-08-03 00:00:00 | admin | set | messages: + msg2269 |
| 2009-08-03 00:00:00 | admin | set | status: ready -> dr |
| 2009-03-23 00:00:00 | admin | set | messages: + msg1893 |
| 2009-03-23 00:00:00 | admin | set | status: drafting -> ready |
| 2008-10-05 00:00:00 | admin | set | status: open -> drafting |
| 2008-07-02 00:00:00 | admin | create | |