identity Structure

提供类型定义作为模板参数的结构。

template<class Type>
   struct identity {
      typedef Type type;
      Type operator()(const Type& _Left) const;
   };

参数

Parameter

说明

_Left

标识的值。

备注

选件类包含公共类型定义 type,与模板参数类型。它与模板函数 forward 结合使用确保函数参数的所需类型。

为了与早期的代码的兼容性,选件类还定义返回其参数 _Left的标识函数 operator()。

要求

标头: <utility>

命名空间: std

请参见

参考

<utility>