1234567891011121314151617181920212223242526272829303132333435363738394041 |
- [/
- Copyright 2015 Peter Dimov.
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt).
- ]
- [section:copy_cv copy_cv]
- template <class T, class U>
- struct copy_cv
- {
- typedef __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 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`]]
- ]
- [endsect]
|