Add documentation for type_identity as well.

This commit is contained in:
Peter Dimov
2015-06-08 00:09:40 +03:00
parent d0dbb24faf
commit 2a645db56c
3 changed files with 36 additions and 0 deletions

View File

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

31
doc/type_identity.qbk Normal file
View File

@ -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 <class T>
struct type_identity
{
typedef T type;
};
__header ` #include <boost/type_traits/type_identity.hpp>` or ` #include <boost/type_traits.hpp>`
[table Examples
[ [Expression] [Result Type]]
[[`type_identity<int>::type`][`int`]]
[[`type_identity<int&>::type`] [`int&`]]
[[`type_identity<int* const&>::type`] [`int* const&`]]
]
[endsect]

View File

@ -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]