إشعار
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تسجيل الدخول أو تغيير الدلائل.
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تغيير الدلائل.
Produces the type as passed by value. Makes the type non-reference, non-const, non-volatile, or makes a pointer to the type from a function or an array type.
Syntax
template <class T>
struct decay;
template <class T>
using decay_t = typename decay<T>::type;
Parameters
T
The type to modify.
Remarks
Use the decay template to produce the resulting type as if the type was passed by value as an argument. The class template member typedef type holds a modified type that is defined in the following stages:
The type
Uis defined asremove_reference<T>::type.If
is_array<U>::valueis true, the modified typetypeisremove_extent<U>::type *.Otherwise, if
is_function<U>::valueis true, the modified typetypeisadd_pointer<U>::type.Otherwise, the modified type
typeisremove_cv<U>::type.
Requirements
Header: <type_traits>
Namespace: std