1295. Contradictory call wrapper requirements

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

Priority: Not Prioritized

View all other issues in [func.require].

View all issues with C++11 status.

Discussion:

23.14.3 [func.require]/3 b 1 says

3 If a call wrapper (23.14.2 [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 (23.14.2 [func.def]):

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

23.14.2 [func.def]/7

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

and 23.14.2 [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 23.14.3 [func.require]/3 b 1 as indicated:

3 If a call wrapper (23.14.2 [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 (23.14.2 [func.def]):