reference_wrapper::result_type
O tipo de resultado de referência flexível ajustado.
typedef T0 result_type;
Comentários
O typedef é um sinônimo para o tipo fraco do resultado de uma função ajustado.
Exemplo
// std_tr1__functional__reference_wrapper_result_type.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>
int neg(int val)
{
return (-val);
}
int main()
{
typedef std::reference_wrapper<int (int)> Mywrapper;
Mywrapper rwi(neg);
Mywrapper::result_type val = rwi(3);
std::cout << "val = " << val << std::endl;
return (0);
}
Requisitos
Cabeçalho: <funcional>
Namespace: std