You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An instance of the type modifier holds the modified-type [add_volatile Class](../standard-library/add-volatile-class.md)`<`[add_const Class](../standard-library/add-const-class.md)`<Ty> >`.
58
+
An instance of the modified type `add_cv<T>` has a `type` member typedef equivalent to *T* modified by both [add_volatile](../standard-library/add-volatile-class.md) and [add_const](../standard-library/add-const-class.md), unless *T* already has the cv-qualifiers, is a reference, or is a function.
59
+
60
+
The `add_cv_t<T>` helper type is a shortcut to access the `add_cv<T>` member typedef `type`.
using add_pointer_t = typename add_pointer<T>::type;
55
51
```
56
52
57
53
#### Parameters
58
-
`Ty`
59
-
The type to modify.
54
+
*T*
55
+
The type to modify.
60
56
61
57
## Remarks
62
-
The member typedef type names the same type as `remove_reference<T>::type*`.
58
+
The member typedef `type` names the same type as `remove_reference<T>::type*`. The alias `add_pointer_t` is a shortcut to access the member typedef `type`.
63
59
64
-
Because it is invalid to make a pointer from a reference, `add_pointer` removes the reference, if any, from the specified type before it makes a pointer-to-type. Consequently, you can use a type with `add_pointer` without being concerned about whether the type is a reference.
60
+
Because it is invalid to make a pointer from a reference, `add_pointer` removes the reference, if any, from the specified type before it makes a pointer-to-type. Consequently, you can use a type with `add_pointer` without being concerned about whether the type is a reference.
65
61
66
62
## Example
67
-
The following example demonstrates that `add_pointer` of a type is the same as a pointer to that type.
63
+
The following example demonstrates that `add_pointer` of a type is the same as a pointer to that type.
using add_volatile_t = typename add_volatile<T>::type;
55
51
```
56
52
57
-
####Parameters
58
-
`Ty`
59
-
The type to modify.
53
+
### Parameters
54
+
*T*
55
+
The type to modify.
60
56
61
57
## Remarks
62
-
An instance of the type modifier holds a modified-type that is `Ty` if `Ty` is a reference, a function, or a volatile-qualified type, otherwise `volatile Ty`.
58
+
An instance of `add_volatile<T>` has a member typedef `type` that is *T* if *T* is a reference, a function, or a volatile-qualified type, otherwise `volatile`*T*. The alias `add_volatile_t` is a shortcut to access the member typedef `type`.
0 commit comments