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.

### 520. Result_of and pointers to data members

Section: 22.10.15 [func.bind], 99 [tr.func.bind] Status: CD1 Submitter: Pete Becker Opened: 2005-07-03 Last modified: 2016-01-28

Priority: Not Prioritized

View all issues with CD1 status.

Discussion:

In the original proposal for binders, the return type of bind() when called with a pointer to member data as it's callable object was defined to be mem_fn(ptr); when Peter Dimov and I unified the descriptions of the TR1 function objects we hoisted the descriptions of return types into the INVOKE pseudo-function and into result_of. Unfortunately, we left pointer to member data out of result_of, so bind doesn't have any specified behavior when called with a pointer to member data.

Proposed resolution:

[ Pete and Peter will provide wording. ]

In 20.5.4 [lib.func.ret] ([tr.func.ret]) p3 add the following bullet after bullet 2:

1. […]
2. […]
3. If `F` is a member data pointer type `R T::*`, `type` shall be `cv R&` when `T1` is `cv U1&`, `R` otherwise.

[ Peter provided wording. ]