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