声明于<functional>中,对于一个给定类型T,这个类提供ref()用来隐式转换为T&,一个cref()用来隐式转换为const T&,这允许函数模板得以操作引用,而不需要另写特化版本 比如: template<typename T> void foo(T val); int x; foo(ref(x)); T变成