Created on2011-08-15.00:00:00 last changed145 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (February, 2012):
Move 12.2.4.3 [over.ics.rank] paragraph 3, first bullet, thirdsub-bullet, after the current fifth sub-bullet, as follows:
Two implicit conversion sequences of the same form areindistinguishable conversion sequences unless one of the followingrules applies:
Standard conversion sequenceS1 is a betterconversion sequence...
S1 is a proper subsequence ofS2...
the rank ofS1 is better...
S1 andS2 differ only in theirqualification conversion... —end example] or if notthat,S1 andS2 are reference bindings(9.5.4 [dcl.init.ref]) and neither refers... or if notthat,
S1 andS2 are reference bindings(9.5.4 [dcl.init.ref]) and S1 binds... —endexample]or if not that,
S1 andS2 differ only in theirqualification conversion... —end example]or if not that,
S1 andS2 are reference bindings(9.5.4 [dcl.init.ref]), and the types to which the referencesrefer...
- User-defined conversion sequenceU1...
Notes from the February, 2012 meeting:
The CWG agreed that bullets 3 and 4 should be reversed, to checkthe reference binding first and then for qualification conversion.
The rule in 12.2.4.3 [over.ics.rank] paragraph 3 for rankingbased on a difference in qualification conversion applies only if they"differ only in their qualification conversion".
It is unclear as to whether the property of being a referencebinding is a factor in determining if there is a differencebetween conversion sequences. Notice that 12.2.4.2.5 [over.ics.ref] maps reference bindings to other forms ofimplicit conversion sequences, but does not state that theproperty of being a reference binding is preserved; however,12.2.4.3 [over.ics.rank] has cases which depend on whethercertain standard conversion sequences are reference bindings ornot and on the specifics of the bindings.
In the following, pickingT2 && would bind anrvalue to an rvalue reference. PickingT1 & wouldbind an rvalue to an lvalue reference, but the qualificationconversion toT1 is "better". Which is better?
typedef int * * *const *const T1; typedef int *const *const *const *const T2; void foo(T1 &); void foo(T2 &&) { } int main() { foo((int ****)0); return 0; }| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
| 2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
| 2013-05-03 00:00:00 | admin | set | messages: +msg4420 |
| 2013-05-03 00:00:00 | admin | set | status: ready -> dr |
| 2012-11-03 00:00:00 | admin | set | status: review -> ready |
| 2012-02-27 00:00:00 | admin | set | messages: +msg3761 |
| 2012-02-27 00:00:00 | admin | set | messages: +msg3760 |
| 2012-02-27 00:00:00 | admin | set | status: open -> review |
| 2011-08-15 00:00:00 | admin | create | |