identity Structure
提供型別定義當做樣板參數的結構。
template<class Type>
struct identity {
typedef Type type;
Type operator()(const Type& _Left) const;
};
參數
參數 |
描述 |
---|---|
_Left |
要驗證的值。 |
備註
類別包含公用型別定義 type,與範本參數型別。它使用樣板函式 forward 一起用於確保函式參數具有所需型別。
為了與舊版程式碼的相容性,類別也會定義傳回其引數 _Left的識別函式 operator() 。
需求
標題: <utility>
命名空間: std