PL
Size: a a a
PL
AP
AN
struct A
{
unsigned int m_a = 1337u;
};
int main()
{
static_assert( std::is_invocable<decltype( &A::m_a ), A>::value ); // 1
std::invoke( &A::m_a, A() ); // 2
return 0;
}
SS
AB
AB
A
AB
ПК
AP
AB
ПК
AP
AB
ПК
AB
AB
Е
As such, std::result_of suffers from several quirks that led to its deprecation in favor of std::invoke_result in C++17:
F cannot be a function type or an array type (but can be a reference to them);
if any of the Args has type "array of T" or a function type T, it is automatically adjusted to T*;
neither F nor any of Args... can be an abstract class type;
if any of Args... has a top-level cv-qualifier, it is discarded;
none of Args... may be of type void.