Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
The return type of the stored callable object.
typedef Ret result_type;
Remarks
The typedef is a synonym for the type Ret in the template's call signature. You use it to determine the return type of the wrapped callable object.
Example
// std_tr1__functional__function_result_type.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>
int neg(int val)
{
return (-val);
}
int main()
{
std::function<int (int)> fn1(neg);
std::cout << std::boolalpha << "empty == " << !fn1 << std::endl;
std::function<int (int)>::result_type val = fn1(3);
std::cout << "val == " << val << std::endl;
return (0);
}
empty == false val == -3
Requirements
Header: <functional>
Namespace: std