Namespaces
Variants
Views
Actions

std::add_cv, std::add_const, std::add_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 add_cv;
</td>

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

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

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

<td >
template< class T >
struct add_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 it has a cv-qualifier added (unless T is a function, a reference, or already has this cv-qualifier)

1) adds both Template:cpp and Template:cpp

2) adds Template:cpp

3) adds 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]
removes const and/or volatile specifiers from the given type
(class template) [edit]