decay Class
Makes non reference, non const, or non volatile type, or makes a pointer to type.
template<class Ty>
struct decay;
template<class T>
using decay_t = typename decay<T>::type;
Parameters
Parameter |
Description |
---|---|
Ty |
The type to modify. |
Remarks
An instance of the type modifier holds a modified-type that is defined in the following stages:
The type U is defined as remove_reference<Ty>::type.
If is_array<U>::value is true, the modified-type type is remove_extent<U>::type *.
Otherwise, if is_function<U>::value is true, the modified-type type is add_pointer<U>::type.
Otherwise, the modified-type type is remove_cv<U>::type.
Requirements
Header: <type_traits>
Namespace: std