This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

### 521. Garbled requirements for argument_type in reference_wrapper

Section: 22.10.6 [refwrap], 99 [tr.util.refwrp.refwrp] Status: CD1 Submitter: Pete Becker Opened: 2005-07-03 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [refwrap].

View all issues with CD1 status.

Discussion:

2.1.2/3, second bullet item currently says that reference_wrapper<T> is derived from unary_function<T, R> if T is:

> a pointer to member function type with cv-qualifier cv and no arguments; the type T1 is cv T* and R is the return type of the pointer to member function;

The type of T1 can't be cv T*, 'cause that's a pointer to a pointer to member function. It should be a pointer to the class that T is a pointer to member of. Like this:

> a pointer to a member function R T0::f() cv (where cv represents the member function's cv-qualifiers); the type T1 is cv T0*

Similarly, bullet item 2 in 2.1.2/4 should be:

> a pointer to a member function R T0::f(T2) cv (where cv represents the member function's cv-qualifiers); the type T1 is cv T0*

Proposed resolution:

Change bullet item 2 in 2.1.2/3:

> - a pointer to member function type with cv-qualifier `cv` and no arguments; the type `T1` is `cv T*` and `R` is the return type of the pointer to member function `R T0::f() cv` (where `cv` represents the member function's cv-qualifiers); the type `T1` is `cv T0*`

Change bullet item 2 in 2.1.2/4:

> - a pointer to member function with cv-qualifier `cv` and taking one argument of type `T2`; the type `T1` is `cv T*` and `R` is the return type of the pointer to member function `R T0::f(T2) cv` (where `cv` represents the member function's cv-qualifiers); the type `T1` is `cv T0*`