]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | [/ |
2 | Copyright 2015 Peter Dimov. | |
3 | Distributed under the Boost Software License, Version 1.0. | |
4 | (See accompanying file LICENSE_1_0.txt or copy at | |
5 | http://www.boost.org/LICENSE_1_0.txt). | |
6 | ] | |
7 | ||
8 | [section:copy_cv copy_cv] | |
9 | ||
10 | template <class T, class U> | |
11 | struct copy_cv | |
12 | { | |
13 | typedef __below type; | |
14 | }; | |
15 | ||
16 | __type [^T /cv/], where /cv/ are the cv-qualifiers of `U`. | |
17 | ||
18 | __header ` #include <boost/type_traits/copy_cv.hpp>` or ` #include <boost/type_traits.hpp>` | |
19 | ||
20 | [table Examples | |
21 | ||
22 | [ [Expression] [Result Type]] | |
23 | ||
24 | [[`copy_cv<int, void>::type`][`int`]] | |
25 | ||
26 | [[`copy_cv<int const, void>::type`][`int const`]] | |
27 | ||
28 | [[`copy_cv<int, void const>::type`][`int const`]] | |
29 | ||
30 | [[`copy_cv<int volatile, void const>::type`][`int const volatile`]] | |
31 | ||
32 | [[`copy_cv<int&, void const>::type`] [`int&`]] | |
33 | ||
34 | [[`copy_cv<int*, void volatile>::type`] [`int* volatile`]] | |
35 | ||
36 | ] | |
37 | ||
38 | [endsect] | |
39 |