reference_wrapper::result_type
The weak result type of the wrapped reference.
typedef T0 result_type;
설명
The typedef is a synonym for the weak result type of a wrapped function.
예제
// 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);
}
요구 사항
헤더: <기능>
네임스페이스: std