reference_wrapper::type

ラップされた参照の型です。

typedef Ty type;

解説

この typedef は、テンプレート引数 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); 
    } 
 
  

必要条件

ヘッダー : <functional>

名前空間: std

参照

関連項目

reference_wrapper クラス

reference_wrapper::result_type