Skip to content

Commit d28c770

Browse files
jensmaurerzygoloid
authored andcommitted
P0887R1 The identity metafunction
1 parent 591545d commit d28c770

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/utilities.tex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15322,6 +15322,7 @@
1532215322
\rSec2[meta.type.synop]{Header \tcode{<type_traits>} synopsis}
1532315323

1532415324
\indexhdr{type_traits}%
15325+
\indexlibrary{\idxcode{type_identity_t}}%
1532515326
\begin{codeblock}
1532615327
namespace std {
1532715328
// \ref{meta.help}, helper class
@@ -15491,6 +15492,7 @@
1549115492
using add_pointer_t = typename add_pointer<T>::type;
1549215493

1549315494
// \ref{meta.trans.other}, other transformations
15495+
template<class T> struct type_identity;
1549415496
template<size_t Len, size_t Align = @\textit{default-alignment}@> // see \ref{meta.trans.other}
1549515497
struct aligned_storage;
1549615498
template<size_t Len, class... Types> struct aligned_union;
@@ -15502,6 +15504,8 @@
1550215504
template<class T> struct underlying_type;
1550315505
template<class Fn, class... ArgTypes> struct invoke_result;
1550415506

15507+
template<class T>
15508+
using type_identity_t = typename type_identity<T>::type;
1550515509
template<size_t Len, size_t Align = @\textit{default-alignment}@> // see \ref{meta.trans.other}
1550615510
using aligned_storage_t = typename aligned_storage<Len, Align>::type;
1550715511
template<size_t Len, class... Types>
@@ -16835,6 +16839,12 @@
1683516839
\lhdr{Template} & \rhdr{Comments} \\ \capsep
1683616840
\endhead
1683716841

16842+
\indexlibrary{\idxcode{type_identity}}%
16843+
\tcode{template<class T>\br
16844+
struct type_identity;}
16845+
&
16846+
The member typedef \tcode{type} names the type \tcode{T}. \\ \rowsep
16847+
1683816848
\indexlibrary{\idxcode{aligned_storage}}%
1683916849
\tcode{template<size_t Len,\br
1684016850
size_t Align\br

0 commit comments

Comments
 (0)