Compartilhar via


reference_wrapper::get

Obtém a referência de conjunto.

Ty& get() const;

Comentários

A função de membro retorna INVOKE(get(), t1, t2, ..., tN).

Exemplo

 

// std_tr1__functional__reference_wrapper_get.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 << "rwi = " << rwi << std::endl; 
    rwi.get() = -1; 
    std::cout << "i = " << i << std::endl; 
 
    return (0); 
    } 
 
  

Requisitos

Cabeçalho: <funcional>

Namespace: std

Consulte também

Referência

Classe reference_wrapper

reference_wrapper::operator()