Date
2010-12-08.00:00:00
Message id
5467

Content

Issue 1295 correctly removed function types and references to function types from the bullet 1 of [func.require] p. 3 because neither function types nor function references satisfy the requirements for a target object which is defined to be an object of a callable type. This has the effect that the reference in [refwrap] p. 2

reference_wrapper has a weak result type (20.8.2).

is insufficient as a reference to define the member type result_type when the template argument T is a function type.

There are basically two approaches to solve the problem:

  1. Extend the definition of a weak result type in [func.require] p. 3 to both function types and references thereof. This extension must be specified independend from the concept of a call wrapper, though.

  2. Add one extra sentence to [refwrap] p. 2 that simply defines the member type result_type for reference_wrapper<T>, when T is a function type.

I checked the current usages of weak result type to have a base to argue for one or the other approach. It turns out, that there is no further reference to this definition in regard to function types or references thereof. The only other reference can be found in [func.bind.bind] p. 3, where g is required to be a class type.