diff --git a/doc/transform_traits.qbk b/doc/transform_traits.qbk index 9a7757c..321a06a 100644 --- a/doc/transform_traits.qbk +++ b/doc/transform_traits.qbk @@ -83,6 +83,9 @@ result of applying the transformation to the template argument `T`. template struct __remove_volatile; + template + struct __type_identity; + [h4 Broken Compiler Workarounds:] For all of these templates support for partial specialization of class templates is diff --git a/doc/type_identity.qbk b/doc/type_identity.qbk new file mode 100644 index 0000000..975653d --- /dev/null +++ b/doc/type_identity.qbk @@ -0,0 +1,31 @@ +[/ + 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:type_identity type_identity] + + template + struct type_identity + { + typedef T type; + }; + +__header ` #include ` or ` #include ` + +[table Examples + +[ [Expression] [Result Type]] + +[[`type_identity::type`][`int`]] + +[[`type_identity::type`] [`int&`]] + +[[`type_identity::type`] [`int* const&`]] + +] + +[endsect] + diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index 7924a72..4e43921 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -133,6 +133,7 @@ [def __is_complex [link boost_typetraits.reference.is_complex is_complex]] [def __copy_cv [link boost_typetraits.reference.copy_cv copy_cv]] +[def __type_identity [link boost_typetraits.reference.type_identity type_identity]] A printer-friendly [@http://sourceforge.net/projects/boost/files/boost-docs/ PDF version of this manual is also available]. @@ -309,6 +310,7 @@ See __has_trivial_constructor. [include remove_pointer.qbk] [include remove_reference.qbk] [include remove_volatile.qbk] +[include type_identity.qbk] [include type_with_alignment.qbk] [endsect]