Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions source/diagnostics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,6 @@
\indexlibraryglobal{error_code}%
\indexlibraryglobal{error_condition}%
\indexlibraryglobal{system_error}%
\indexlibraryglobal{is_error_code_enum}%
\indexlibraryglobal{is_error_condition_enum}%
\indexlibraryglobal{errc}%
\begin{codeblock}
#include <compare> // see \ref{compare.syn}

Expand All @@ -729,12 +726,12 @@
class system_error;

template<class T>
struct is_error_code_enum : public false_type {};
struct @\libglobal{is_error_code_enum}@ : public false_type {};

template<class T>
struct is_error_condition_enum : public false_type {};
struct @\libglobal{is_error_condition_enum}@ : public false_type {};

enum class errc { // freestanding
enum class @\libglobal{errc}@ { // freestanding
address_family_not_supported, // \tcode{EAFNOSUPPORT}
address_in_use, // \tcode{EADDRINUSE}
address_not_available, // \tcode{EADDRNOTAVAIL}
Expand Down Expand Up @@ -837,7 +834,7 @@

// \ref{syserr}, system error support
template<class T>
constexpr bool is_error_code_enum_v = is_error_code_enum<T>::value;
constexpr bool @\libglobal{is_error_code_enum_v}@ = is_error_code_enum<T>::value;
template<class T>
constexpr bool is_error_condition_enum_v = is_error_condition_enum<T>::value;
}
Expand Down
41 changes: 15 additions & 26 deletions source/meta.tex
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@
template<class T, T v> struct integral_constant;

template<bool B>
using bool_constant = integral_constant<bool, B>;
using true_type = bool_constant<true>;
using false_type = bool_constant<false>;
using @\libglobal{bool_constant}@ = integral_constant<bool, B>;
using @\libglobal{true_type}@ = bool_constant<true>;
using @\libglobal{false_type}@ = bool_constant<false>;

// \ref{meta.unary.cat}, primary type categories
template<class T> struct is_void;
Expand Down Expand Up @@ -595,7 +595,7 @@
\indexlibrarymember{value_type}{integral_constant}%
\begin{codeblock}
namespace std {
template<class T, T v> struct integral_constant {
template<class T, T v> struct @\libglobal{integral_constant}@ {
static constexpr T value = v;

using value_type = T;
Expand All @@ -607,7 +607,6 @@
}
\end{codeblock}

\indexlibraryglobal{integral_constant}%
\indexlibraryglobal{bool_constant}%
\indexlibraryglobal{true_type}%
\indexlibraryglobal{false_type}%
Expand Down Expand Up @@ -1907,21 +1906,18 @@
\lhdr{Template} & \rhdr{Comments} \\ \capsep
\endhead

\indexlibraryglobal{type_identity}%
\tcode{template<class T>\br
struct type_identity;}
struct \libglobal{type_identity};}
&
The member typedef \tcode{type} denotes \tcode{T}. \\ \rowsep

\indexlibraryglobal{remove_cvref}%
\tcode{template<class T>\br struct remove_cvref;}
\tcode{template<class T>\br struct \libglobal{remove_cvref};}
&
The member typedef \tcode{type} denotes
\tcode{remove_cv_t<remove_reference_t<T>>}.
\\ \rowsep

\indexlibraryglobal{decay}%
\tcode{template<class T>\br struct decay;}
\tcode{template<class T>\br struct \libglobal{decay};}
&
Let \tcode{U} be \tcode{remove_reference_t<T>}. If \tcode{is_array_v<U>} is
\tcode{true}, the member typedef \tcode{type} denotes
Expand All @@ -1937,16 +1933,15 @@
\end{tailnote}
\\ \rowsep

\indexlibraryglobal{enable_if}%
\tcode{template<bool B, class T = void>} \tcode{struct enable_if;}
\tcode{template<bool B, class T = void>} \tcode{struct \libglobal{enable_if};}
&
If \tcode{B} is \tcode{true}, the member typedef \tcode{type}
denotes \tcode{T}; otherwise, there shall be no member
\tcode{type}. \\ \rowsep

\tcode{template<bool B, class T,}
\tcode{class F>}\br
\tcode{struct conditional;}
\tcode{struct \libglobal{conditional};}
&
If \tcode{B} is \tcode{true}, the member typedef \tcode{type} denotes \tcode{T}.
If \tcode{B} is \tcode{false}, the member typedef \tcode{type} denotes \tcode{F}. \\ \rowsep
Expand All @@ -1959,36 +1954,32 @@
Each type in the template parameter pack \tcode{T} shall be
complete, \cv{}~\keyword{void}, or an array of unknown bound. \\ \rowsep

\indexlibraryglobal{basic_common_reference}%
\tcode{template<class, class,}
\hspace*{2ex}\tcode{template<class> class,}
\hspace*{2ex}\tcode{template<class> class>}
\keyword{struct}
\hspace*{2ex}\tcode{basic_common_reference;}
\hspace*{2ex}\tcode{\libglobal{basic_common_reference};}
&
Unless this trait is specialized,
there shall be no member \tcode{type}. \\ \rowsep

\indexlibraryglobal{common_reference}%
\tcode{template<class... T>} \tcode{struct common_reference;}
\tcode{template<class... T>} \tcode{struct \libglobal{common_reference};}
&
The member \grammarterm{typedef-name} \tcode{type} is defined or omitted
as specified below. Each type in the parameter pack \tcode{T} shall
be complete or \cv{} \keyword{void}. \\ \rowsep

\indexlibraryglobal{underlying_type}%
\tcode{template<class T>}\br
\tcode{struct underlying_type;}
\tcode{struct \libglobal{underlying_type};}
&
If \tcode{T} is an enumeration type, the member typedef \tcode{type} denotes
the underlying type of \tcode{T}\iref{dcl.enum};
otherwise, there is no member \tcode{type}.\br
\mandates \tcode{T} is not an incomplete enumeration type. \\ \rowsep

\indexlibraryglobal{invoke_result}%
\tcode{template<class Fn,}\br
\tcode{class... ArgTypes>}\br
\tcode{struct invoke_result;}
\tcode{struct \libglobal{invoke_result};}
&
If the expression \tcode{\placeholdernc{INVOKE}(declval<Fn>(), declval<ArgTypes>()...)}\iref{func.require}
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand},
Expand All @@ -2009,17 +2000,15 @@
are complete types, \cv{}~\keyword{void}, or arrays of
unknown bound.\\ \rowsep

\indexlibraryglobal{unwrap_reference}%
\tcode{template<class T>} \tcode{struct unwrap_reference;}
\tcode{template<class T>} \tcode{struct \libglobal{unwrap_reference};}
&
If \tcode{T} is
a specialization \tcode{reference_wrapper<X>} for some type \tcode{X},
the member typedef \tcode{type} of \tcode{unwrap_reference<T>}
denotes \tcode{X\&},
otherwise \tcode{type} denotes \tcode{T}. \\ \rowsep

\indexlibraryglobal{unwrap_ref_decay}%
\tcode{template<class T>} \tcode{unwrap_ref_decay;}
\tcode{template<class T>} \tcode{\libglobal{unwrap_ref_decay};}
&
The member typedef \tcode{type} of \tcode{unwrap_ref_decay<T>}
denotes the type \tcode{unwrap_reference_t<decay_t<T>>}.\\
Expand Down
Loading