reference_wrapper::type
The type of the wrapped reference.
typedef Ty type;
설명
The typedef is a synonym for the template argument Ty.
예제
// std_tr1__functional__reference_wrapper_type.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>
int neg(int val)
{
return (-val);
}
int main()
{
int i = 1;
typedef std::reference_wrapper<int> Mywrapper;
Mywrapper rwi(i);
Mywrapper::type val = rwi.get();
std::cout << "i = " << i << std::endl;
std::cout << "rwi = " << val << std::endl;
return (0);
}
요구 사항
헤더: <기능>
네임스페이스: std