Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 01b856e70e.
PrevUpHomeNext

copy_cv

template <class T, class U>
struct copy_cv
{
   typedef see-below type;
};

template <class T, class U> using copy_cv_t = typename copy_cv<T, U>::type; // C++11 and above

type: T cv, where cv are the cv-qualifiers of U.

Header: #include <boost/type_traits/copy_cv.hpp> or #include <boost/type_traits.hpp>

Table 1.17. Examples

Expression

Result Type

copy_cv<int, void>::type

int

copy_cv<int const, void>::type

int const

copy_cv<int, void const>::type

int const

copy_cv<int volatile, void const>::type

int const volatile

copy_cv<int&, void const>::type

int&

copy_cv<int*, void volatile>::type

int* volatile



PrevUpHomeNext