Export (0) Print
Expand All
Expand Minimize

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;

Parameter

Description

Ty

The type to modify.

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.

Header: <type_traits>

Namespace: std

Show:
© 2014 Microsoft