Skip to content

Commit

Permalink
Consistently employ _t suffixes when mentioning any type trait's
Browse files Browse the repository at this point in the history
resulting type.

Fixes cplusplus#221.
  • Loading branch information
W-E-Brown authored and zygoloid committed May 1, 2014
1 parent d8324f8 commit 99fe1d0
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 60 deletions.
2 changes: 1 addition & 1 deletion source/lib-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@
\tcode{X::size_type} &
unsigned integer type &
a type that can represent the size of the largest object in the allocation model. &
\tcode{make_unsigned<X::\brk{}difference_type>::type} \\ \rowsep
\tcode{make_unsigned_t<X::\brk{}difference_type>} \\ \rowsep

\tcode{X::difference_type} &
signed integer type &
Expand Down
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3070,7 +3070,7 @@

\begin{itemdescr}
\pnum
Let \tcode{U} be \tcode{remove_reference<T>::type}.
Let \tcode{U} be \tcode{remove_reference_t<T>}.

\pnum
\requires \tcode{U} shall be \tcode{CopyConstructible}.
Expand Down
4 changes: 2 additions & 2 deletions source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@

\pnum
\remarks
This constructor shall not participate in overload resolution if \tcode{decay<F>::type}
This constructor shall not participate in overload resolution if \tcode{decay_t<F>}
is the same type as \tcode{std::thread}.

\pnum
Expand Down Expand Up @@ -4850,7 +4850,7 @@

\pnum
\remarks
These constructors shall not participate in overload resolution if \tcode{decay<F>::type}
These constructors shall not participate in overload resolution if \tcode{decay_t<F>}
is the same type as \tcode{std::packaged_task<R(ArgTypes...)>}.

\pnum
Expand Down
112 changes: 56 additions & 56 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@
\returns \tcode{pair<V1, V2>(std::forward<T1>(x), std::forward<T2>(y))};

where \tcode{V1} and \tcode{V2} are determined as follows: Let \tcode{Ui} be
\tcode{decay<Ti>::type} for each \tcode{Ti}. Then each \tcode{Vi} is \tcode{X\&}
\tcode{decay_t<Ti>} for each \tcode{Ti}. Then each \tcode{Vi} is \tcode{X\&}
if \tcode{Ui} equals \tcode{reference_wrapper<X>}, otherwise \tcode{Vi} is
\tcode{Ui}.

Expand Down Expand Up @@ -1541,7 +1541,7 @@
constexpr tuple<@\textit{VTypes}@...> make_tuple(Types&&... t);
\end{itemdecl}

\begin{itemdescr} \pnum Let \tcode{$U_i$} be \tcode{decay<$T_i$>::type} for each
\begin{itemdescr} \pnum Let \tcode{$U_i$} be \tcode{decay_t<$T_i$>} for each
$T_i$ in \tcode{Types}. Then each $V_i$ in \tcode{VTypes} is
\tcode{X\&} if $U_i$ equals \tcode{reference_wrapper<X>}, otherwise
$V_i$ is $U_i$.
Expand Down Expand Up @@ -1621,7 +1621,7 @@
\begin{itemdescr}
\pnum
In the following paragraphs, let $T_i$ be the $i^{th}$ type in \tcode{Tuples},
$U_i$ be \tcode{remove_reference<Ti>::type}, and $tp_i$ be the $i^{th}$
$U_i$ be \tcode{remove_reference_t<Ti>}, and $tp_i$ be the $i^{th}$
parameter in the function parameter pack \tcode{tpls}, where all indexing is
zero-based.

Expand Down Expand Up @@ -1696,7 +1696,7 @@
of the three templates shall meet the \tcode{UnaryTypeTrait} requirements~(\ref{meta.rqmts})
with a \tcode{BaseCharacteristic} of
\begin{codeblock}
integral_constant<remove_cv<decltype(TS::value)>::type, TS::value>
integral_constant<remove_cv_t<decltype(TS::value)>, TS::value>
\end{codeblock}
\end{itemdescr}

Expand All @@ -1714,13 +1714,13 @@

\begin{itemize}
\item
for the first specialization, \tcode{add_const<\term{TE}::type>::type},
for the first specialization, \tcode{add_const_t<\term{TE}::type>},

\item
for the second specialization, \tcode{add_volatile<\term{TE}::type>::type}, and
for the second specialization, \tcode{add_volatile_t<\term{TE}::type>}, and

\item
for the third specialization, \tcode{add_cv<\term{TE}::type>::type}.
for the third specialization, \tcode{add_cv_t<\term{TE}::type>}.

\end{itemize}

Expand Down Expand Up @@ -3633,7 +3633,7 @@
\begin{itemdescr}
\pnum
\ctype \tcode{Alloc::size_type} if such a type exists; otherwise,
\tcode{make_unsigned<difference_type>::type}.
\tcode{make_unsigned_t<difference_type>}.
\end{itemdescr}

\indexlibrary{\idxcode{allocator_traits}!\idxcode{propagate_on_container_copy_assignment}}%
Expand Down Expand Up @@ -4542,8 +4542,8 @@
the requirements of \tcode{Destructible} (Table~\ref{destructible}).

\pnum
If the type \tcode{remove_reference<D>::type::pointer} exists, then \tcode{unique_ptr<T,
D>::pointer} shall be a synonym for \tcode{remove_reference<D>::type::pointer}. Otherwise
If the type \tcode{remove_reference_t<D>::pointer} exists, then \tcode{unique_ptr<T,
D>::pointer} shall be a synonym for \tcode{remove_reference_t<D>::pointer}. Otherwise
\tcode{unique_ptr<T, D>::pointer} shall be a synonym for \tcode{T*}. The type \tcode{unique_ptr<T,
D>::pointer} shall
satisfy the requirements of \tcode{NullablePointer} (\ref{nullablepointer.requirements}).
Expand Down Expand Up @@ -4830,7 +4830,7 @@
requirements of \tcode{MoveAssignable} (Table~\ref{moveassignable}) and assignment
of the deleter from an rvalue of type \tcode{D} shall not throw an exception.
Otherwise, \tcode{D} is a reference type;
\tcode{remove_reference<D>::type} shall satisfy the \tcode{CopyAssignable}
\tcode{remove_reference_t<D>} shall satisfy the \tcode{CopyAssignable}
requirements and assignment of the deleter from an
lvalue of type \tcode{D} shall not throw an exception.

Expand Down Expand Up @@ -8209,10 +8209,10 @@
In the text that follows, the following names have the following meanings:

\begin{itemize}
\item \tcode{FD} is the type \tcode{decay<F>::type},
\item \tcode{FD} is the type \tcode{decay_t<F>},
\item \tcode{fd} is an lvalue of type \tcode{FD} constructed from \tcode{std::forward<F>(f)},
\item \tcode{Ti} is the $i^{th}$ type in the template parameter back \tcode{BoundArgs},
\item \tcode{TiD} is the type \tcode{decay<Ti>::type},
\item \tcode{TiD} is the type \tcode{decay_t<Ti>},
\item \tcode{ti} is the $i^{th}$ argument in the function parameter pack \tcode{bound_args},
\item \tcode{tid} is an lvalue of type \tcode{TiD} constructed from \tcode{std::forward<Ti>(ti)},
\item \tcode{Uj} is the $j^{th}$ deduced type of the \tcode{UnBoundArgs\&\&...} parameter
Expand All @@ -8238,8 +8238,8 @@

\pnum\returns A forwarding call wrapper \tcode{g} with a weak result
type~(\ref{func.require}). The effect of \tcode{g(u1, u2, ..., uM)} shall
be \tcode{\textit{INVOKE}(fd, std::forward<V1>(v1), std::forward<V2>(v2), ..., std::forward<VN>(vN), result_of<FD \textit{cv} \&
(V1, V2, ..., VN)>::type)}, where \tcode{\textit{cv}} represents the
be \tcode{\textit{INVOKE}(fd, std::forward<V1>(v1), std::forward<V2>(v2), ..., std::forward<VN>(vN), result_of_t<FD \textit{cv} \&
(V1, V2, ..., VN)>)}, where \tcode{\textit{cv}} represents the
\textit{cv}-qualifiers of \tcode{g} and the values and types of the bound
arguments \tcode{v1, v2, ..., vN} are determined as specified below.
The copy constructor and move constructor of the forwarding call wrapper shall throw an
Expand Down Expand Up @@ -8310,7 +8310,7 @@
\item if the value of \tcode{is_bind_expression<TiD>::value}
is \tcode{true}, the argument is \tcode{tid(std::forward<Uj>(\brk{}uj)...)} and its
type \tcode{Vi} is
\tcode{result_of<TiD \textit{cv} \& (Uj\&\&...)>::type\&\&};
\tcode{result_of_t<TiD \textit{cv} \& (Uj\&\&...)>\&\&};

\item if the value \tcode{j} of \tcode{is_placeholder<TiD>::value}
is not zero, the argument is \tcode{std::forward<Uj>(uj)}
Expand Down Expand Up @@ -9332,31 +9332,31 @@
\tcode{template <class T>}\br
\tcode{struct is_trivial;} &
\tcode{T} is a trivial type~(\ref{basic.types}) &
\tcode{remove_all_extents<T>::type} shall be a complete
\tcode{remove_all_extents_t<T>} shall be a complete
type or (possibly cv-qualified) void. \\ \rowsep

\tcode{template <class T>}\br
\tcode{struct is_trivially_copyable;} &
\tcode{T} is a trivially copyable type~(\ref{basic.types}) &
\tcode{remove_all_extents<T>::type} shall be a complete type or
\tcode{remove_all_extents_t<T>} shall be a complete type or
(possibly cv-qualified) \tcode{void}. \\ \rowsep

\tcode{template <class T>}\br
\tcode{struct is_standard_layout;} &
\tcode{T} is a standard-layout type~(\ref{basic.types}) &
\tcode{remove_all_extents<T>::type} shall be a complete
\tcode{remove_all_extents_t<T>} shall be a complete
type or (possibly cv-qualified) void. \\ \rowsep

\tcode{template <class T>}\br
\tcode{struct is_pod;} &
\tcode{T} is a POD type~(\ref{basic.types}) &
\tcode{remove_all_extents<T>::type} shall be a complete
\tcode{remove_all_extents_t<T>} shall be a complete
type or (possibly cv-qualified) void. \\ \rowsep

\tcode{template <class T>}\br
\tcode{struct is_literal_type;} &
\tcode{T} is a literal type~(\ref{basic.types}) &
\tcode{remove_all_extents<T>::type} shall be a complete type or
\tcode{remove_all_extents_t<T>} shall be a complete type or
(possibly cv-qualified) \tcode{void}. \\ \rowsep

\tcode{template <class T>}\br
Expand Down Expand Up @@ -9449,7 +9449,7 @@
For reference types, \tcode{is_destructible<T>::value} is \tcode{true}. \br
For incomplete types and function types, \tcode{is_destructible<T>::value} is
\tcode{false}. \br
For object types and given \tcode{U} equal to \tcode{remove_all_extents<T>::type},
For object types and given \tcode{U} equal to \tcode{remove_all_extents_t<T>},
if the expression \tcode{std::declval<U\&>().\~{}U()} is well-formed
when treated as an unevaluated operand (Clause~\ref{expr}), \br then
\tcode{is_destructible<T>::value} is \tcode{true},
Expand Down Expand Up @@ -9606,10 +9606,10 @@
\pnum
\enterexample
\begin{codeblock}
remove_const<const volatile int>::type // \tcode{volatile int}
remove_const<const int* const>::type // \tcode{const int*}
remove_const<const int&>::type // \tcode{const int\&}
remove_const<const int[3]>::type // \tcode{int[3]}
remove_const_t<const volatile int> // \tcode{volatile int}
remove_const_t<const int* const> // \tcode{const int*}
remove_const_t<const int&> // \tcode{const int\&}
remove_const_t<const int[3]> // \tcode{int[3]}
\end{codeblock}
\exitexample

Expand Down Expand Up @@ -9819,25 +9819,25 @@
The member typedef \tcode{type} shall name
the same type as \tcode{T}
except that any top-level const-qualifier has been removed.
\enterexample \tcode{remove_const<const volatile int>::type} evaluates
to \tcode{volatile int}, whereas \tcode{remove_const<const int*>::type} evaluates to
\enterexample \tcode{remove_const_t<const volatile int>} evaluates
to \tcode{volatile int}, whereas \tcode{remove_const_t<const int*>} evaluates to
\tcode{const int*}. \exitexample \\ \rowsep
\tcode{template <class T>\br
struct remove_volatile;} &
The member typedef \tcode{type} shall name
the same type as \tcode{T}
except that any top-level volatile-qualifier has been removed.
\enterexample \tcode{remove_volatile<const volatile
int>::type} evaluates to \tcode{const int},
whereas \tcode{remove_volatile<volatile int*>::type} evaluates to \tcode{volatile int*}.
\enterexample \tcode{remove_volatile_t<const volatile int>}
evaluates to \tcode{const int},
whereas \tcode{remove_volatile_t<volatile int*>} evaluates to \tcode{volatile int*}.
\exitexample \\ \rowsep
\tcode{template <class T>\br
struct remove_cv;} &
The member typedef \tcode{type} shall be the same as \tcode{T}
except that any top-level cv-qualifier has been removed.
\enterexample \tcode{remove_cv<const
volatile int>::type} evaluates to \tcode{int}, whereas \tcode{remove_cv<const
volatile int*>::type} evaluates to \tcode{const volatile int*}. \exitexample \\ \rowsep
\enterexample \tcode{remove_cv_t<const volatile int>}
evaluates to \tcode{int}, whereas \tcode{remove_cv_t<const volatile int*>}
evaluates to \tcode{const volatile int*}. \exitexample \\ \rowsep
\tcode{template <class T>\br
struct add_const;} &
If \tcode{T} is a reference, function, or top-level const-qualified
Expand Down Expand Up @@ -9891,7 +9891,7 @@
otherwise, \tcode{type} shall name \tcode{T}.
\enternote This rule reflects the semantics of reference collapsing~(\ref{dcl.ref}).
For example, when a type \tcode{T} names a type \tcode{T1\&}, the type
\tcode{add_rvalue_reference<T>::type} is not an rvalue reference.
\tcode{add_rvalue_reference_t<T>} is not an rvalue reference.
\exitnote \\
\end{libreqtab2a}

Expand Down Expand Up @@ -9964,21 +9964,21 @@
[\textit{Example}
\begin{codeblock}
// the following assertions hold:
assert((is_same<remove_extent<int>::type, int>::value));
assert((is_same<remove_extent<int[2]>::type, int>::value));
assert((is_same<remove_extent<int[2][3]>::type, int[3]>::value));
assert((is_same<remove_extent<int[][3]>::type, int[3]>::value));
assert((is_same<remove_extent_t<int>, int>::value));
assert((is_same<remove_extent_t<int[2]>, int>::value));
assert((is_same<remove_extent_t<int[2][3]>, int[3]>::value));
assert((is_same<remove_extent_t<int[][3]>, int[3]>::value));
\end{codeblock}
\exitexample

\pnum
[\textit{Example}
\begin{codeblock}
// the following assertions hold:
assert((is_same<remove_all_extents<int>::type, int>::value));
assert((is_same<remove_all_extents<int[2]>::type, int>::value));
assert((is_same<remove_all_extents<int[2][3]>::type, int>::value));
assert((is_same<remove_all_extents<int[][3]>::type, int>::value));
assert((is_same<remove_all_extents_t<int>, int>::value));
assert((is_same<remove_all_extents_t<int[2]>, int>::value));
assert((is_same<remove_all_extents_t<int[2][3]>, int>::value));
assert((is_same<remove_all_extents_t<int[][3]>, int>::value));
\end{codeblock}
\exitexample

Expand All @@ -9999,7 +9999,7 @@
\tcode{template <class T>\br
struct add_pointer;} &
The member typedef \tcode{type} shall name the same type as
\tcode{remove_reference<T>::type*}. \\
\tcode{remove_reference_t<T>*}. \\
\end{libreqtab2a}
\clearpage

Expand Down Expand Up @@ -10045,11 +10045,11 @@
\\ \rowsep

\tcode{template <class T> struct} \tcode{decay;} & &
Let \tcode{U} be \tcode{remove_reference<T>::type}. If \tcode{is_array<U>::value}
Let \tcode{U} be \tcode{remove_reference_t<T>}. If \tcode{is_array<U>::value}
is \tcode{true}, the member typedef \tcode{type} shall equal
\tcode{remove_extent<U>::type*}. If \tcode{is_function<U>::value} is \tcode{true},
the member typedef \tcode{type} shall equal \tcode{add_pointer<U>::type}. Otherwise
the member typedef \tcode{type} equals \tcode{remove_cv<U>::type}.
\tcode{remove_extent_t<U>*}. If \tcode{is_function<U>::value} is \tcode{true},
the member typedef \tcode{type} shall equal \tcode{add_pointer_t<U>}. Otherwise
the member typedef \tcode{type} equals \tcode{remove_cv_t<U>}.
\enternote This behavior is similar to the lvalue-to-rvalue~(\ref{conv.lval}),
array-to-pointer~(\ref{conv.array}), and function-to-pointer~(\ref{conv.func})
conversions applied when an lvalue expression is used as an rvalue, but also
Expand Down Expand Up @@ -10165,12 +10165,12 @@
the following assertions will hold:

\begin{codeblock}
static_assert(is_same<result_of<S(int)>::type, short>::value, "Error!");
static_assert(is_same<result_of<S&(unsigned char, int&)>::type, double>::value, "Error!");
static_assert(is_same<result_of<PF1()>::type, bool>::value, "Error!");
static_assert(is_same<result_of<PMF(unique_ptr<S>, int)>::type, void>::value, "Error!");
static_assert(is_same<result_of<PMD(S)>::type, char&&>::value, "Error!");
static_assert(is_same<result_of<PMD(const S*)>::type, const char&>::value, "Error!");
static_assert(is_same<result_of_t<S(int)>, short>::value, "Error!");
static_assert(is_same<result_of_t<S&(unsigned char, int&)>, double>::value, "Error!");
static_assert(is_same<result_of_t<PF1()>, bool>::value, "Error!");
static_assert(is_same<result_of_t<PMF(unique_ptr<S>, int)>, void>::value, "Error!");
static_assert(is_same<result_of_t<PMD(S)>, char&&>::value, "Error!");
static_assert(is_same<result_of_t<PMD(const S*)>, const char&>::value, "Error!");
\end{codeblock}
\exitexample

Expand Down Expand Up @@ -11130,7 +11130,7 @@

\pnum
In the function descriptions that follow, \tcode{CD} represents the return type
of the function. \tcode{CR(A,B)} represents \tcode{common_type<A, B>::type}.
of the function. \tcode{CR(A,B)} represents \tcode{common_type_t<A, B>}.

\indexlibrary{\idxcode{common_type}}%
\begin{itemdecl}
Expand Down Expand Up @@ -11257,7 +11257,7 @@

\pnum
In the function descriptions that follow, \tcode{CT} represents
\tcode{common_type<A, B>::type}, where \tcode{A} and \tcode{B} are the types of
\tcode{common_type_t<A, B>}, where \tcode{A} and \tcode{B} are the types of
the two arguments to the function.

\indexlibrary{\idxcode{operator==}!\idxcode{duration}}%
Expand Down

0 comments on commit 99fe1d0

Please sign in to comment.