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

1295. Contradictory call wrapper requirements

Section: 22.10.4 [func.require] Status: C++11 Submitter: Daniel Krügler Opened: 2009-12-22 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [func.require].

View all issues with C++11 status.

Discussion:

22.10.4 [func.require]/3 b 1 says

3 If a call wrapper (22.10.3 [func.def]) has a weak result type the type of its member type result_type is based on the type T of the wrapper's target object (22.10.3 [func.def]):

The first two enumerated types (function and reference to function) can never be valid types for T, because

22.10.3 [func.def]/7

7 A target object is the callable object held by a call wrapper.

and 22.10.3 [func.def]/3

3 A callable type is a pointer to function, a pointer to member function, a pointer to member data, or a class type whose objects can appear immediately to the left of a function call operator.

exclude functions and references to function as "target objects".

[ Post-Rapperswil: ]

Moved to Tentatively Ready after 5 positive votes on c++std-lib.

[ Adopted at 2010-11 Batavia ]

Proposed resolution:

Change 22.10.4 [func.require]/3 b 1 as indicated:

3 If a call wrapper (22.10.3 [func.def]) has a weak result type the type of its member type result_type is based on the type T of the wrapper's target object (22.10.3 [func.def]):