On 2013/05/03 00:10 +0900, Nathan Crookston wrote:
Peter Dimov wrote:
The standard version has 4 member typedef which are conditionally defined: result_type, argument_type, first_argument_type, second_argument_type. ... (snip) Interesting. I've always considered these typedefs redundant, but this is
Kazutoshi Satoda wrote: the first time I see them as actively harmful.
Yes, this is good to know. I wondered why the standard bothered to specify that in our new, decltype-enabled world. ...
I can guess only one reason that the resulting functors are expected to work with some C++03-style function adapters in some old libraries which may have no plan to adapt C++11 features like decltype. About the requirement of these typedefs in 20.8 [function.objects] p5 to enable standard adapters, I found that there is an open issue LWG #2149 which is proposing to drop it. http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2149
While not opposed to striking this paragraph, we will need the additional wording to fix the openning hole before this issue can move forward.
-- k_satoda