Q2. What's wrong with result_type, etc.?
A2. These C++98/03/TR1-era typedefs predated decltype and perfect
forwarding. Previously, generic code had to request information from
function objects before adapting them. Now, manually communicating
that information is unnecessary. decltype supersedes result_type,
because the compiler can simply report what the result of calling a
function object with specific arguments will be. And perfect
forwarding supersedes the argument_type family, since adaptors can
simply take/store/forward arbitrary arguments.
In fact, these typedefs are worse than useless. They're
counterproductive, because many callable objects lack them. Function
pointers and pointers to members have always lacked them. ptr_fun(),
which wrapped function pointers with these typedefs, was recently
removed (see [1] again). Most importantly, lambdas have always lacked
these typedefs, and they are the most important function objects of
all. Generic lambdas are even more incompatible.
What this means is that if a user attempts to write generic code by
using the result_type family of typedefs, their code won't be generic
- it'll fail to handle lambdas, generic lambdas, function pointers, etc.
These typedefs should be removed because they've become actively
harmful to modern code.