Namespaces
Variants
Views
Actions

std::remove_cv, std::remove_const, std::remove_volatile

From cppreference.com
< cpp‎ | types
Revision as of 14:55, 24 December 2011 by P12bot (Talk | contribs)

Template:cpp/types/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <type_traits>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
template< class T >
struct remove_cv;
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
template< class T >
struct remove_const;
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
template< class T >
struct remove_volatile;
</td>

<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

Template:eq fun cpp

Example

Template:example cpp

See also

(C++11)
checks if a type is const-qualified
(class template) [edit]
checks if a type is volatile-qualified
(class template) [edit]