std::decay

From Cppreference

Jump to: navigation, search
Defined in header <type_traits>

template< class T >
struct decay;
(C++11 feature)

Applies lvalue-to-rvalue, array-to-pointer, and function-to-pointer implicit conversions to the type T, removes cv-qualifiers, and defines the resulting type as the member typedef type. This is the type conversion applied to all function arguments when passed by value.

Contents

[edit] Member types

Name Definition
type the result of applying the decay type conversions to T

[edit] Equivalent definition

[edit] Example

[edit] See also

implicit conversion array-to-pointer, function-to-pointer, rvalue-to-lvalue conversions