reference_wrapper::operator Ty&
Gets a pointer to the wrapped reference.
operator Ty&() const;
설명
The member operator returns *ptr.
예제
// std_tr1__functional__reference_wrapper_operator_cast.cpp
// compile with: /EHsc
#include <functional>
#include <iostream>
int main()
{
int i = 1;
std::reference_wrapper<int> rwi(i);
std::cout << "i = " << i << std::endl;
std::cout << "(int)rwi = " << (int)rwi << std::endl;
return (0);
}
요구 사항
헤더: <기능>
네임스페이스: std