Created on 2001-11-14.00:00:00 last changed 196 months ago
[Voted into WP at April 2003 meeting.]
Proposed Resolution (4/02):
Change the last chunk of 13.10.3.4 [temp.deduct.conv] paragraph 2 from
If A is a cv-qualified type, the top level cv-qualifiers of A's type are ignored for type deduction. If A is a reference type, the type referred to by A is used for type deduction.to
If A is a cv-qualified type, the top level cv-qualifiers of A's type are ignored for type deduction. If A is a reference type, the type referred to by A is used for type deduction. If P is a reference type, the type referred to by P is used for type deduction.
Consider:
struct S { template <class T> operator T& (); }; int main () { S s; int i = static_cast<int&> (s); }13.10.3.4 [temp.deduct.conv] says that we strip the reference from int&, but doesn't say anything about T&. As a result, P (T&) and A (int) have incompatible forms and deduction fails.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | messages: + msg877 |
2003-04-25 00:00:00 | admin | set | status: ready -> wp |
2002-11-08 00:00:00 | admin | set | status: review -> ready |
2002-05-10 00:00:00 | admin | set | messages: + msg636 |
2002-05-10 00:00:00 | admin | set | status: open -> review |
2001-11-14 00:00:00 | admin | create |