网站介绍:文章浏览阅读6.2k次,点赞12次,收藏33次。1、作用:std::ref 用于取某个变量的引用,引入其是为了解决函数式编程(如std::bind)的一些传参问题。2、用法:#include <functional>#include <iostream>void f(int& n1, int& n2, const int& n3){ std::cout << "In function: " << n1 << ' ' << n2 <&_std::ref
- 链接地址:https://blog.csdn.net/qq_33726635/article/details/124086352
- 链接标题:std::ref用法-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:2284
- 网站标签:std::ref