다음을 통해 공유


reference_wrapper::result_type

The weak result type of the wrapped reference.

typedef T0 result_type;

Remarks

The typedef is a synonym for the weak result type of a wrapped function.

Example

 

// 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); 
    } 
 
val = -3

Requirements

Header: <functional>

Namespace: std

See Also

Reference

reference_wrapper Class

reference_wrapper::operator()

reference_wrapper::type