最終更新:2021-01-07 (木) 19:20:40 (1205d)  

std::ref
Top / std::ref

C++/参照

https://cpprefjp.github.io/reference/functional/ref.html

void func(int &n){}
std::thread th(func, ref(x))

  • std::reference_wrapper?<int> r = std::ref(x);