Created on 1999-09-14.00:00:00 last changed 196 months ago
[Moved to DR at 10/01 meeting.]
Proposed resolution (04/01):
If a typedef TD names a type "reference to cv1 S," an attempt to create the type "reference to cv2 TD" creates the type "reference to cv12" S," where cv12 is the union of the cv-qualifiers cv1 and cv2. Redundant qualifiers are ignored. [Example:
int i; typedef int& RI; RI& r = i; // r has the type int& const RI& r = i; // r has the type const int&—end example]
If a template-argument for a template-parameter T names a type "reference to cv1 S," an attempt to create the type "reference to cv2 T" creates the type "reference to cv12 S," where cv12 is the union of the cv-qualifiers cv1 and cv2. Redundant cv-qualifiers are ignored. [Example:
template <class T> class X { f(const T&); /* ... */ }; X<int&> x; // X<int&>::f has the parameter type const int&—end example]
Attempting to createa reference to a reference type ora reference to void.
(See also paper J16/00-0022 = WG21 N1245.)
The main defect is in the library, where the binder template can easily lead to reference-to-reference situations.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | status: dr -> wp |
2002-05-10 00:00:00 | admin | set | messages: + msg699 |
2001-11-09 00:00:00 | admin | set | status: ready -> dr |
2000-11-18 00:00:00 | admin | set | status: review -> ready |
2000-09-16 00:00:00 | admin | set | messages: + msg377 |
2000-09-16 00:00:00 | admin | set | status: ready -> review |
2000-05-21 00:00:00 | admin | set | status: drafting -> ready |
2000-02-23 00:00:00 | admin | set | status: open -> drafting |
1999-09-14 00:00:00 | admin | create |