forked from boostorg/type_traits
Add copy_cv documentation.
This commit is contained in:
39
doc/copy_cv.qbk
Normal file
39
doc/copy_cv.qbk
Normal 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]
|
||||
|
@@ -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
|
||||
|
@@ -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]
|
||||
|
Reference in New Issue
Block a user