共用方式為


identity 結構

提供型別定義為範本參數的結構。

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

參數

參數

說明

_Left

識別的值。

備註

類別包含公用型別定義 type,與範本參數型別。 它與樣板函式 forward 一起用來確定函式參數具有所需型別。

為了與舊版程式碼的相容性,類別也會定義傳回其引數 _Left的 Identity 函式 operator() 。

需求

標題: <公用程式>

命名空間: std

請參閱

參考

<utility>