wg21.cmeerw.net

Proposed resolution (04/01):

  1. Add the following as paragraph 6 of 9.2.4 [dcl.typedef]:

    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]
  2. Add the following as paragraph 4 of 13.4.2 [temp.arg.type]:

    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]
  3. In 13.10.3 [temp.deduct] bullet 2.3 sub-bullet 5, remove the indicated text:
    Attempting to create a reference to a reference type or a reference to void .

(See also paper J16/00-0022 = WG21 N1245.)

History Date User Action Args 2008-10-05 00:00:00adminsetstatus: wp -> cd1 2003-04-25 00:00:00adminsetstatus: dr -> wp 2002-05-10 00:00:00adminsetmessages: + msg699 2001-11-09 00:00:00adminsetstatus: ready -> dr 2000-11-18 00:00:00adminsetstatus: review -> ready 2000-09-16 00:00:00adminsetmessages: + msg377 2000-09-16 00:00:00adminsetstatus: ready -> review 2000-05-21 00:00:00adminsetstatus: drafting -> ready 2000-02-23 00:00:00adminsetstatus: open -> drafting 1999-09-14 00:00:00admincreate

Read the original on wg21.cmeerw.net ↗