diff --git a/doc/copy_cv.qbk b/doc/copy_cv.qbk new file mode 100644 index 0000000..9f733a0 --- /dev/null +++ b/doc/copy_cv.qbk @@ -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 + struct copy_cv + { + typedef __below type; + }; + +__type [^T /cv/], where /cv/ are the cv-qualifiers of `U`. + +__header ` #include ` or ` #include ` + +[table Examples + +[ [Expression] [Result Type]] + +[[`copy_cv::type`][`int`]] + +[[`copy_cv::type`][`int const`]] + +[[`copy_cv::type`][`int const`]] + +[[`copy_cv::type`][`int const volatile`]] + +[[`copy_cv::type`] [`int&`]] + +[[`copy_cv::type`] [`int* volatile`]] + +] + +[endsect] + diff --git a/doc/transform_traits.qbk b/doc/transform_traits.qbk index 980ebe4..b96d071 100644 --- a/doc/transform_traits.qbk +++ b/doc/transform_traits.qbk @@ -80,6 +80,9 @@ result of applying the transformation to the template argument `T`. template struct __remove_volatile; + template + struct __copy_cv; + [h4 Broken Compiler Workarounds:] For all of these templates support for partial specialization of class templates is diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index 3965809..7924a72 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -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]