This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-08-20
[Moved to DR at 10/01 meeting.]
The main defect is in the library, where the binder template can easily lead to reference-to-reference situations.
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.)