Created on 2012-11-21.00:00:00 last changed 94 months ago
[Moved to DR at the November, 2014 meeting.]
Proposed resolution (June, 2014):
This issue is resolved by the resolution of issue 1467.
Notes from the April, 2013 meeting:
CWG determined that the latter bullet should apply only if the first one does not.
The interpretation of the following example is unclear in the current wording:
void f(long); void f(initializer_list<int>); int main() { f({1L});
The problem is that a list-initialization sequence can also be a standard conversion sequence, depending on the types of the elements and the type of the parameter, so more than one bullet in the list in 12.2.4.3 [over.ics.rank] paragraph 3 applies:
Two implicit conversion sequences of the same form are indistinguishable conversion sequences unless one of the following rules applies:
Standard conversion sequence S1 is a better conversion sequence than standard conversion sequence S2 if
...
the rank of S1 is better than the rank of S2, or S1 and S2 have the same rank and are distinguishable by the rules in the paragraph below, or, if not that,
...
...
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.
These bullets give opposite results for the example above, and there is implementation variance in which is selected.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: drwp -> cd4 |
2015-05-25 00:00:00 | admin | set | status: dr -> drwp |
2015-04-13 00:00:00 | admin | set | messages: + msg5406 |
2014-11-24 00:00:00 | admin | set | status: ready -> dr |
2014-07-07 00:00:00 | admin | set | status: drafting -> ready |
2014-03-03 00:00:00 | admin | set | messages: + msg4892 |
2013-05-03 00:00:00 | admin | set | messages: + msg4346 |
2013-05-03 00:00:00 | admin | set | status: open -> drafting |
2012-11-21 00:00:00 | admin | create |