|
6882 | 6882 | consteval info @\libglobal{unwrap_ref_decay}@(info type); |
6883 | 6883 | \end{codeblock} |
6884 | 6884 |
|
| 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 | + |
6885 | 6920 | \pnum |
6886 | 6921 | Each function or function template declared above has the following behavior |
6887 | 6922 | based on the signature and return type of that function or function template. |
|
6900 | 6935 |
|
6901 | 6936 | \tcode{bool meta::\placeholder{UNARY}(info type);\br |
6902 | 6937 | bool meta::\placeholder{UNARY}_type(info type);} & |
6903 | | -\tcode{std::\placeholder{UNARY}_v<$T$>}, |
| 6938 | +\tcode{std::\placeholder{UNARY}<$T$>::value}, |
6904 | 6939 | where $T$ is the type or type alias represented by \tcode{type} |
6905 | 6940 | \\ \rowsep |
6906 | 6941 |
|
6907 | 6942 | \tcode{bool meta::\placeholder{BINARY}(info t1, info t2);\br |
6908 | 6943 | 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}, |
6910 | 6945 | where $T_1$ and $T_2$ are the types or type aliases |
6911 | 6946 | represented by \tcode{t1} and \tcode{t2}, respectively |
6912 | 6947 | \\ \rowsep |
6913 | 6948 |
|
6914 | 6949 | \tcode{template<reflection_range R>\br |
6915 | 6950 | 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}, |
6917 | 6952 | where $T$ is the type or type alias represented by \tcode{type} |
6918 | 6953 | and \tcode{U...} is the pack of types or type aliases |
6919 | 6954 | whose elements are represented by the corresponding elements of \tcode{args} |
6920 | 6955 | \\ \rowsep |
6921 | 6956 |
|
6922 | 6957 | \tcode{template<reflection_range R>\br |
6923 | 6958 | 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}, |
6925 | 6960 | where $T_1$ and $T_2$ are the types or type aliases |
6926 | 6961 | represented by \tcode{t1} and \tcode{t2}, respectively, |
6927 | 6962 | and \tcode{$U$...} is the pack of types or type aliases |
|
6930 | 6965 |
|
6931 | 6966 | \tcode{info meta::\placeholder{UNARY}(info type);} & |
6932 | 6967 | A reflection representing the type denoted by |
6933 | | -\tcode{std::\placeholder{UNARY}_t<\brk{}$T$>}, |
| 6968 | +\tcode{std::\placeholder{UNARY}<\brk{}$T$>::type}, |
6934 | 6969 | where $T$ is the type or type alias represented by \tcode{type} |
6935 | 6970 | \\ \rowsep |
6936 | 6971 |
|
6937 | 6972 | \tcode{template<reflection_range R>\br |
6938 | 6973 | info meta::\placeholder{VARIADIC}(R\&\& args);} & |
6939 | 6974 | A reflection representing the type denoted by |
6940 | | -\tcode{std::\placeholder{VARIADIC}_t<$T$...>}, |
| 6975 | +\tcode{std::\placeholder{VARIADIC}<$T$...>::type}, |
6941 | 6976 | where \tcode{$T$...} is the pack of types or type aliases |
6942 | 6977 | whose elements are represented by the corresponding elements of \tcode{args} |
6943 | 6978 | \\ \rowsep |
6944 | 6979 |
|
6945 | 6980 | \tcode{template<reflection_range R>\br |
6946 | 6981 | info meta::\placeholder{VARIADIC}(info type, R\&\& args);} & |
6947 | 6982 | A reflection representing the type denoted by |
6948 | | -\tcode{std::\placeholder{VARIADIC}_t<$T$, $U$...>}, |
| 6983 | +\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::type}, |
6949 | 6984 | where \tcode{$T$} is the type or type alias represented by \tcode{type} |
6950 | 6985 | and \tcode{$U$...} is the pack of types or type aliases |
6951 | 6986 | whose elements are represented by the corresponding elements of \tcode{args} |
|
6975 | 7010 | \begin{itemdescr} |
6976 | 7011 | \pnum |
6977 | 7012 | \returns |
6978 | | -\tcode{rank_v<$T$>}, |
| 7013 | +\tcode{std::rank<$T$>::value}, |
6979 | 7014 | where $T$ is the type represented by \tcode{dealias(type)}. |
6980 | 7015 | \end{itemdescr} |
6981 | 7016 |
|
|
6987 | 7022 | \begin{itemdescr} |
6988 | 7023 | \pnum |
6989 | 7024 | \returns |
6990 | | -\tcode{extent_v<$T$, $I$>}, |
| 7025 | +\tcode{std::extent<$T$, $I$>::value}, |
6991 | 7026 | where $T$ is the type represented by \tcode{dealias(type)} |
6992 | 7027 | and $I$ is a constant equal to \tcode{i}. |
6993 | 7028 | \end{itemdescr} |
|
7000 | 7035 | \begin{itemdescr} |
7001 | 7036 | \pnum |
7002 | 7037 | \returns |
7003 | | -\tcode{tuple_size_v<$T$>}, |
| 7038 | +\tcode{std::tuple_size<$T$>::value}, |
7004 | 7039 | where $T$ is the type represented by \tcode{dealias(type)}. |
7005 | 7040 | \end{itemdescr} |
7006 | 7041 |
|
|
7026 | 7061 | \begin{itemdescr} |
7027 | 7062 | \pnum |
7028 | 7063 | \returns |
7029 | | -\tcode{variant_size_v<$T$>}, |
| 7064 | +\tcode{std::variant_size<$T$>::value}, |
7030 | 7065 | where $T$ is the type represented by \tcode{dealias(type)}. |
7031 | 7066 | \end{itemdescr} |
7032 | 7067 |
|
|
7039 | 7074 | \pnum |
7040 | 7075 | \returns |
7041 | 7076 | A reflection representing the type denoted by |
7042 | | -\tcode{variant_alternative_t<$I$, $T$>}, |
| 7077 | +\tcode{std::variant_alternative<$I$, $T$>::type}, |
7043 | 7078 | where $T$ is the type represented by \tcode{dealias(type)} |
7044 | 7079 | and $I$ is a constant equal to \tcode{index}. |
7045 | 7080 | \end{itemdescr} |
|
7052 | 7087 | \begin{itemdescr} |
7053 | 7088 | \pnum |
7054 | 7089 | \returns |
7055 | | -\tcode{type_order_v<$T_1$, $T_2$>}, |
| 7090 | +\tcode{std::type_order<$T_1$, $T_2$>::value}, |
7056 | 7091 | where $T_1$ and $T_2$ are the types |
7057 | 7092 | represented by \tcode{dealias(t1)} and \tcode{dealias(t2)}, respectively. |
7058 | 7093 | \end{itemdescr} |
|
0 commit comments