提供了一种类型参数定义为模板的结构。
template<class Type>
struct identity {
typedef Type type;
Type operator()(const Type& _Left) const;
};
参数
备注
类包含公共类型定义 type,与模板参数类型。 当模板函数 forward 一同用于确保函数参数的所需类型。
为了与早期代码的兼容性,类还定义返回参数 _Left的恒等函数 operator()。
要求
页眉: <实用工具>
命名空间: std
请参见
参考
<utility>