decay Class

讓非參考,非 const,或非動態型別,或使輸入的指標。

template<class Ty>
    struct decay;

參數

參數

描述

Ty

若要修改型別。

備註

執行個體的型別修飾詞會保留修改型別定義包含下列階段:

  • 型別U定義為remove_reference<Ty>::type。

  • 如果is_array<U>::value為 true,修改型別type是remove_extent<U>::type *。

  • 否則,如果is_function<U>::value為 true,修改型別type是add_pointer<U>::type。

  • 否則,修改型別type是remove_cv<U>::type。

需求

標頭: <type_traits>

Namespace: 標準

請參閱

參考

<type_traits>

其他資源

<type_traits> 成員