Add copy_cv documentation.

This commit is contained in:
Peter Dimov
2015-06-07 21:10:51 +03:00
parent e31d0ab7bd
commit 5fcc741db4
3 changed files with 45 additions and 0 deletions

39
doc/copy_cv.qbk Normal file
View File

@@ -0,0 +1,39 @@
[/
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;
};
__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]

View File

@@ -80,6 +80,9 @@ result of applying the transformation to the template argument `T`.
template <class T>
struct __remove_volatile;
template <class T, class U>
struct __copy_cv;
[h4 Broken Compiler Workarounds:]
For all of these templates support for partial specialization of class templates is

View File

@@ -132,6 +132,8 @@
[def __decay [link boost_typetraits.reference.decay decay]]
[def __is_complex [link boost_typetraits.reference.is_complex is_complex]]
[def __copy_cv [link boost_typetraits.reference.copy_cv copy_cv]]
A printer-friendly [@http://sourceforge.net/projects/boost/files/boost-docs/
PDF version of this manual is also available].
@@ -183,6 +185,7 @@ that is the result of the transformation.
[include alignment_of.qbk]
[include conditional.qbk]
[include common_type.qbk]
[include copy_cv.qbk]
[include decay.qbk]
[include extent.qbk]
[include floating_point_promotion.qbk]