std::remove_cv, std::remove_const, std::remove_volatile
From cppreference.com
Template:cpp/types/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<type_traits>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td >template< class T >
struct remove_cv;
</td>
struct remove_cv;
<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >template< class T >
struct remove_const;
</td>
struct remove_const;
<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >template< class T >
struct remove_volatile;
</td>
struct remove_volatile;
<td > (3) </td> <td > (since C++11) </td> </tr> Template:ddcl list end
Provides the member typedef type
which is the same as T
, except that its topmost cv-qualifiers are removed.
1) removes the topmost Template:cpp, the topmost Template:cpp, or both, if present.
2) removes the topmost Template:cpp
3) removes the topmost Template:cpp
Contents |
Member types
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list end
Equivalent definition
Example
See also
(C++11) |
checks if a type is const-qualified (class template) |
(C++11) |
checks if a type is volatile-qualified (class template) |