Title
Contradictory call wrapper requirements
Status
c++11
Section
[func.require]
Submitter
Daniel Krügler

Created on 2009-12-22.00:00:00 last changed 161 months ago

Messages

Date: 2010-11-23.13:22:14

Proposed resolution:

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

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

  • if T is a function, reference to function, or pointer to function type, result_type shall be a synonym for the return type of T;
  • [..]
Date: 2010-11-23.13:22:14

[ Adopted at 2010-11 Batavia ]

Date: 2010-10-21.19:06:53

[ Post-Rapperswil: ]

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

Date: 2009-12-22.00:00:00

[func.require]/3 b 1 says

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

  • if T is a function, reference to function, or pointer to function type, result_type shall be a synonym for the return type of T;
  • [..]

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

[func.def]/7

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

and [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".

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-11-23 13:22:14adminsetmessages: + msg5402
2010-11-14 13:10:57adminsetstatus: voting -> wp
2010-11-08 14:14:39adminsetstatus: ready -> voting
2010-10-21 19:06:53adminsetmessages: + msg4768
2010-10-21 19:06:53adminsetstatus: new -> ready
2010-10-21 18:28:33adminsetmessages: + msg1485
2009-12-22 00:00:00admincreate