Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

identity Structure

A struct that provides a type definition as the template parameter.

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

Parameter

Description

_Left

The value to identify.

The class contains the public type definition type, which is the same as the template parameter Type. It is used in conjunction with template function forward to ensure that a function parameter has the desired type.

For compatibility with older code, the class also defines the identity function operator() which returns its argument _Left.

Header: <utility>

Namespace: std

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.