Export (0) Print
Expand All

add_cv Class

Makes const/volatile type from type.

template<class Ty>
    struct add_cv;

Ty

The type to modify.

An instance of the type modifier holds the modified-type add_volatile Class< add_const Class<Ty> >.

 

// std_tr1__type_traits__add_cv.cpp 
// compile with: /EHsc 
#include <type_traits> 
#include <iostream> 
 
int main() 
    { 
    std::tr1::add_cv<int>::type *p = (const volatile int *)0; 
 
    p = p;  // to quiet "unused" warning 
    std::cout << "add_cv<int> == " 
        << typeid(*p).name() << std::endl; 
 
    return (0); 
    } 
 
add_cv<int> == int

Header: <type_traits>

Namespace: std::tr1

Community Additions

ADD
Show:
© 2014 Microsoft