Skip to content

Commit 497da84

Browse files
committed
P3914R0: Re NB US 130-193 (C++26 CD)
Fixes NB US 130-193 (C++26 CD).
1 parent b80ef8f commit 497da84

File tree

1 file changed

+48
-13
lines changed

1 file changed

+48
-13
lines changed

source/meta.tex

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6882,6 +6882,41 @@
68826882
consteval info @\libglobal{unwrap_ref_decay}@(info type);
68836883
\end{codeblock}
68846884

6885+
\pnum
6886+
For a function or function template $F$ defined in this subclause,
6887+
let $C$ be its associated class template.
6888+
For the evaluation of a call to $F$,
6889+
let $S$ be the specialization of $C$ in terms of which the call is specified.
6890+
\begin{itemize}
6891+
\item
6892+
If
6893+
\begin{itemize}
6894+
\item
6895+
the template arguments of $S$ violate a condition specified
6896+
in a \Fundescx{Mandates} element in the specification of $C$;
6897+
\item
6898+
the call is specified to produce a reflection of a type,
6899+
but $S$ would have no member named \tcode{type}; or
6900+
\item
6901+
the call is specified to return \tcode{S::value},
6902+
but that expression is not a valid converted constant expression of type \tcode{R},
6903+
where \tcode{R} is the return type of $F$;
6904+
\end{itemize}
6905+
then an exception of type \tcode{meta::exception} is thrown.
6906+
\begin{note}
6907+
For the first case, $S$ is not instantiated.
6908+
\end{note}
6909+
\item
6910+
Otherwise, if the instantiation of $S$ would result in undefined behavior
6911+
due to dependence on an incomplete type\iref{meta.rqmts},
6912+
then the call is not a constant subexpression.
6913+
\item
6914+
Otherwise, if the template arguments of $S$ do not meet the preconditions of $C$,
6915+
then it is unspecified whether the call is a constant subexpression.
6916+
If it is, the call produces the result
6917+
that would be produced if $C$ had no preconditions.
6918+
\end{itemize}
6919+
68856920
\pnum
68866921
Each function or function template declared above has the following behavior
68876922
based on the signature and return type of that function or function template.
@@ -6900,28 +6935,28 @@
69006935

69016936
\tcode{bool meta::\placeholder{UNARY}(info type);\br
69026937
bool meta::\placeholder{UNARY}_type(info type);} &
6903-
\tcode{std::\placeholder{UNARY}_v<$T$>},
6938+
\tcode{std::\placeholder{UNARY}<$T$>::value},
69046939
where $T$ is the type or type alias represented by \tcode{type}
69056940
\\ \rowsep
69066941

69076942
\tcode{bool meta::\placeholder{BINARY}(info t1, info t2);\br
69086943
bool meta::\placeholder{BINARY}_type(info t1, info t2);} &
6909-
\tcode{std::\placeholder{BINARY}_v<$T_1$, $T_2$>},
6944+
\tcode{std::\placeholder{BINARY}<$T_1$, $T_2$>::value},
69106945
where $T_1$ and $T_2$ are the types or type aliases
69116946
represented by \tcode{t1} and \tcode{t2}, respectively
69126947
\\ \rowsep
69136948

69146949
\tcode{template<reflection_range R>\br
69156950
bool meta::\placeholder{VARIADIC}_type(info type, R\&\& args);} &
6916-
\tcode{std::\placeholder{VARIADIC}_v<$T$, $U$...>},
6951+
\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::value},
69176952
where $T$ is the type or type alias represented by \tcode{type}
69186953
and \tcode{U...} is the pack of types or type aliases
69196954
whose elements are represented by the corresponding elements of \tcode{args}
69206955
\\ \rowsep
69216956

69226957
\tcode{template<reflection_range R>\br
69236958
bool meta::\placeholder{VARIADIC}_type(info t1, info t2, R\&\& args);} &
6924-
\tcode{std::\placeholder{VARIADIC}_v<$T_1$, $T_2$, $U$...>},
6959+
\tcode{std::\placeholder{VARIADIC}<$T_1$, $T_2$, $U$...>::value},
69256960
where $T_1$ and $T_2$ are the types or type aliases
69266961
represented by \tcode{t1} and \tcode{t2}, respectively,
69276962
and \tcode{$U$...} is the pack of types or type aliases
@@ -6930,22 +6965,22 @@
69306965

69316966
\tcode{info meta::\placeholder{UNARY}(info type);} &
69326967
A reflection representing the type denoted by
6933-
\tcode{std::\placeholder{UNARY}_t<\brk{}$T$>},
6968+
\tcode{std::\placeholder{UNARY}<\brk{}$T$>::type},
69346969
where $T$ is the type or type alias represented by \tcode{type}
69356970
\\ \rowsep
69366971

69376972
\tcode{template<reflection_range R>\br
69386973
info meta::\placeholder{VARIADIC}(R\&\& args);} &
69396974
A reflection representing the type denoted by
6940-
\tcode{std::\placeholder{VARIADIC}_t<$T$...>},
6975+
\tcode{std::\placeholder{VARIADIC}<$T$...>::type},
69416976
where \tcode{$T$...} is the pack of types or type aliases
69426977
whose elements are represented by the corresponding elements of \tcode{args}
69436978
\\ \rowsep
69446979

69456980
\tcode{template<reflection_range R>\br
69466981
info meta::\placeholder{VARIADIC}(info type, R\&\& args);} &
69476982
A reflection representing the type denoted by
6948-
\tcode{std::\placeholder{VARIADIC}_t<$T$, $U$...>},
6983+
\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::type},
69496984
where \tcode{$T$} is the type or type alias represented by \tcode{type}
69506985
and \tcode{$U$...} is the pack of types or type aliases
69516986
whose elements are represented by the corresponding elements of \tcode{args}
@@ -6975,7 +7010,7 @@
69757010
\begin{itemdescr}
69767011
\pnum
69777012
\returns
6978-
\tcode{rank_v<$T$>},
7013+
\tcode{std::rank<$T$>::value},
69797014
where $T$ is the type represented by \tcode{dealias(type)}.
69807015
\end{itemdescr}
69817016

@@ -6987,7 +7022,7 @@
69877022
\begin{itemdescr}
69887023
\pnum
69897024
\returns
6990-
\tcode{extent_v<$T$, $I$>},
7025+
\tcode{std::extent<$T$, $I$>::value},
69917026
where $T$ is the type represented by \tcode{dealias(type)}
69927027
and $I$ is a constant equal to \tcode{i}.
69937028
\end{itemdescr}
@@ -7000,7 +7035,7 @@
70007035
\begin{itemdescr}
70017036
\pnum
70027037
\returns
7003-
\tcode{tuple_size_v<$T$>},
7038+
\tcode{std::tuple_size<$T$>::value},
70047039
where $T$ is the type represented by \tcode{dealias(type)}.
70057040
\end{itemdescr}
70067041

@@ -7026,7 +7061,7 @@
70267061
\begin{itemdescr}
70277062
\pnum
70287063
\returns
7029-
\tcode{variant_size_v<$T$>},
7064+
\tcode{std::variant_size<$T$>::value},
70307065
where $T$ is the type represented by \tcode{dealias(type)}.
70317066
\end{itemdescr}
70327067

@@ -7039,7 +7074,7 @@
70397074
\pnum
70407075
\returns
70417076
A reflection representing the type denoted by
7042-
\tcode{variant_alternative_t<$I$, $T$>},
7077+
\tcode{std::variant_alternative<$I$, $T$>::type},
70437078
where $T$ is the type represented by \tcode{dealias(type)}
70447079
and $I$ is a constant equal to \tcode{index}.
70457080
\end{itemdescr}
@@ -7052,7 +7087,7 @@
70527087
\begin{itemdescr}
70537088
\pnum
70547089
\returns
7055-
\tcode{type_order_v<$T_1$, $T_2$>},
7090+
\tcode{std::type_order<$T_1$, $T_2$>::value},
70567091
where $T_1$ and $T_2$ are the types
70577092
represented by \tcode{dealias(t1)} and \tcode{dealias(t2)}, respectively.
70587093
\end{itemdescr}

0 commit comments

Comments
 (0)