reference_wrapper::operator()
Calls the wrapped reference.
template<class T1, class T2, ..., class TN>
typename result_of<T(T1, T2, ..., TN)>::type
operator()(T1& t1, T2& t2, ..., TN& tN);
매개 변수
TN
The type of the Nth call argument.tN
The Nth call argument.
설명
The template member operator returns INVOKE(get(), t1, t2, ..., tN).
예제
// std_tr1__functional__reference_wrapper_operator_call.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>
int neg(int val)
{
return (-val);
}
int main()
{
std::reference_wrapper<int (int)> rwi(neg);
std::cout << "rwi(3) = " << rwi(3) << std::endl;
return (0);
}
요구 사항
헤더: <기능>
네임스페이스: std