|
6870 | 6870 | consteval info @\libglobal{unwrap_ref_decay}@(info type); |
6871 | 6871 | \end{codeblock} |
6872 | 6872 |
|
| 6873 | +\pnum |
| 6874 | +For a function or function template $F$ defined in this subclause, |
| 6875 | +let $C$ be its associated class template. |
| 6876 | +For the evaluation of a call to $F$, |
| 6877 | +let $S$ be the specialization of $C$ in terms of which the call is specified. |
| 6878 | +\begin{itemize} |
| 6879 | +\item |
| 6880 | + If |
| 6881 | + \begin{itemize} |
| 6882 | + \item |
| 6883 | + the template arguments of $S$ violate a condition specified |
| 6884 | + in a \Fundescx{Mandates} element in the specification of $C$; |
| 6885 | + \item |
| 6886 | + the call is specified to produce a reflection of a type, |
| 6887 | + but $S$ would have no member named \tcode{type}; or |
| 6888 | + \item |
| 6889 | + the call is specified to return \tcode{$S$::value}, |
| 6890 | + but that expression would not be a valid converted constant expression of type \tcode{R}, |
| 6891 | + where \tcode{R} is the return type of $F$; |
| 6892 | + \end{itemize} |
| 6893 | + then an exception of type \tcode{meta::exception} is thrown. |
| 6894 | + \begin{note} |
| 6895 | + For the first case, $S$ is not instantiated. |
| 6896 | + \end{note} |
| 6897 | + \item |
| 6898 | + Otherwise, if the instantiation of $S$ would result in undefined behavior |
| 6899 | + due to dependence on an incomplete type\iref{meta.rqmts}, |
| 6900 | + then the call is not a constant subexpression. |
| 6901 | + \item |
| 6902 | + Otherwise, if the template arguments of $S$ do not meet the preconditions of $C$, |
| 6903 | + then it is unspecified whether the call is a constant subexpression. |
| 6904 | + If it is, the call produces the result |
| 6905 | + that would be produced if $C$ had no preconditions. |
| 6906 | +\end{itemize} |
| 6907 | + |
6873 | 6908 | \pnum |
6874 | 6909 | Each function or function template declared above has the following behavior |
6875 | 6910 | based on the signature and return type of that function or function template. |
|
6888 | 6923 |
|
6889 | 6924 | \tcode{bool meta::\placeholder{UNARY}(info type);\br |
6890 | 6925 | bool meta::\placeholder{UNARY}_type(info type);} & |
6891 | | -\tcode{std::\placeholder{UNARY}_v<$T$>}, |
| 6926 | +\tcode{std::\placeholder{UNARY}<$T$>::value}, |
6892 | 6927 | where $T$ is the type or type alias represented by \tcode{type} |
6893 | 6928 | \\ \rowsep |
6894 | 6929 |
|
6895 | 6930 | \tcode{bool meta::\placeholder{BINARY}(info t1, info t2);\br |
6896 | 6931 | bool meta::\placeholder{BINARY}_type(info t1, info t2);} & |
6897 | | -\tcode{std::\placeholder{BINARY}_v<$T_1$, $T_2$>}, |
| 6932 | +\tcode{std::\placeholder{BINARY}<$T_1$, $T_2$>::value}, |
6898 | 6933 | where $T_1$ and $T_2$ are the types or type aliases |
6899 | 6934 | represented by \tcode{t1} and \tcode{t2}, respectively |
6900 | 6935 | \\ \rowsep |
6901 | 6936 |
|
6902 | 6937 | \tcode{template<reflection_range R>\br |
6903 | 6938 | bool meta::\placeholder{VARIADIC}_type(info type, R\&\& args);} & |
6904 | | -\tcode{std::\placeholder{VARIADIC}_v<$T$, $U$...>}, |
| 6939 | +\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::value}, |
6905 | 6940 | where $T$ is the type or type alias represented by \tcode{type} |
6906 | 6941 | and \tcode{U...} is the pack of types or type aliases |
6907 | 6942 | whose elements are represented by the corresponding elements of \tcode{args} |
6908 | 6943 | \\ \rowsep |
6909 | 6944 |
|
6910 | 6945 | \tcode{template<reflection_range R>\br |
6911 | 6946 | bool meta::\placeholder{VARIADIC}_type(info t1, info t2, R\&\& args);} & |
6912 | | -\tcode{std::\placeholder{VARIADIC}_v<$T_1$, $T_2$, $U$...>}, |
| 6947 | +\tcode{std::\placeholder{VARIADIC}<$T_1$, $T_2$, $U$...>::value}, |
6913 | 6948 | where $T_1$ and $T_2$ are the types or type aliases |
6914 | 6949 | represented by \tcode{t1} and \tcode{t2}, respectively, |
6915 | 6950 | and \tcode{$U$...} is the pack of types or type aliases |
|
6918 | 6953 |
|
6919 | 6954 | \tcode{info meta::\placeholder{UNARY}(info type);} & |
6920 | 6955 | A reflection representing the type denoted by |
6921 | | -\tcode{std::\placeholder{UNARY}_t<\brk{}$T$>}, |
| 6956 | +\tcode{std::\placeholder{UNARY}<\brk{}$T$>::type}, |
6922 | 6957 | where $T$ is the type or type alias represented by \tcode{type} |
6923 | 6958 | \\ \rowsep |
6924 | 6959 |
|
6925 | 6960 | \tcode{template<reflection_range R>\br |
6926 | 6961 | info meta::\placeholder{VARIADIC}(R\&\& args);} & |
6927 | 6962 | A reflection representing the type denoted by |
6928 | | -\tcode{std::\placeholder{VARIADIC}_t<$T$...>}, |
| 6963 | +\tcode{std::\placeholder{VARIADIC}<$T$...>::type}, |
6929 | 6964 | where \tcode{$T$...} is the pack of types or type aliases |
6930 | 6965 | whose elements are represented by the corresponding elements of \tcode{args} |
6931 | 6966 | \\ \rowsep |
6932 | 6967 |
|
6933 | 6968 | \tcode{template<reflection_range R>\br |
6934 | 6969 | info meta::\placeholder{VARIADIC}(info type, R\&\& args);} & |
6935 | 6970 | A reflection representing the type denoted by |
6936 | | -\tcode{std::\placeholder{VARIADIC}_t<$T$, $U$...>}, |
| 6971 | +\tcode{std::\placeholder{VARIADIC}<$T$, $U$...>::type}, |
6937 | 6972 | where \tcode{$T$} is the type or type alias represented by \tcode{type} |
6938 | 6973 | and \tcode{$U$...} is the pack of types or type aliases |
6939 | 6974 | whose elements are represented by the corresponding elements of \tcode{args} |
|
6963 | 6998 | \begin{itemdescr} |
6964 | 6999 | \pnum |
6965 | 7000 | \returns |
6966 | | -\tcode{rank_v<$T$>}, |
| 7001 | +\tcode{std::rank<$T$>::value}, |
6967 | 7002 | where $T$ is the type represented by \tcode{dealias(type)}. |
6968 | 7003 | \end{itemdescr} |
6969 | 7004 |
|
|
6975 | 7010 | \begin{itemdescr} |
6976 | 7011 | \pnum |
6977 | 7012 | \returns |
6978 | | -\tcode{extent_v<$T$, $I$>}, |
| 7013 | +\tcode{std::extent<$T$, $I$>::value}, |
6979 | 7014 | where $T$ is the type represented by \tcode{dealias(type)} |
6980 | 7015 | and $I$ is a constant equal to \tcode{i}. |
6981 | 7016 | \end{itemdescr} |
|
6988 | 7023 | \begin{itemdescr} |
6989 | 7024 | \pnum |
6990 | 7025 | \returns |
6991 | | -\tcode{tuple_size_v<$T$>}, |
| 7026 | +\tcode{std::tuple_size<$T$>::value}, |
6992 | 7027 | where $T$ is the type represented by \tcode{dealias(type)}. |
6993 | 7028 | \end{itemdescr} |
6994 | 7029 |
|
|
7001 | 7036 | \pnum |
7002 | 7037 | \returns |
7003 | 7038 | A reflection representing |
7004 | | -the type denoted by \tcode{tuple_element_t<$I$, $T$>}, |
| 7039 | +the type denoted by \tcode{std::tuple_element<$I$, $T$>::type}, |
7005 | 7040 | where $T$ is the type represented by \tcode{dealias(type)} |
7006 | 7041 | and $I$ is a constant equal to \tcode{index}. |
7007 | 7042 | \end{itemdescr} |
|
7014 | 7049 | \begin{itemdescr} |
7015 | 7050 | \pnum |
7016 | 7051 | \returns |
7017 | | -\tcode{variant_size_v<$T$>}, |
| 7052 | +\tcode{std::variant_size<$T$>::value}, |
7018 | 7053 | where $T$ is the type represented by \tcode{dealias(type)}. |
7019 | 7054 | \end{itemdescr} |
7020 | 7055 |
|
|
7027 | 7062 | \pnum |
7028 | 7063 | \returns |
7029 | 7064 | A reflection representing the type denoted by |
7030 | | -\tcode{variant_alternative_t<$I$, $T$>}, |
| 7065 | +\tcode{std::variant_alternative<$I$, $T$>::type}, |
7031 | 7066 | where $T$ is the type represented by \tcode{dealias(type)} |
7032 | 7067 | and $I$ is a constant equal to \tcode{index}. |
7033 | 7068 | \end{itemdescr} |
|
7040 | 7075 | \begin{itemdescr} |
7041 | 7076 | \pnum |
7042 | 7077 | \returns |
7043 | | -\tcode{type_order_v<$T_1$, $T_2$>}, |
| 7078 | +\tcode{std::type_order<$T_1$, $T_2$>::value}, |
7044 | 7079 | where $T_1$ and $T_2$ are the types |
7045 | | -represented by \tcode{dealias(t1)} and \tcode{dealias(t2)}, respectively. |
| 7080 | +represented by \tcode{de\-alias(\brk{}t1)} and \tcode{dealias(t2)}, respectively. |
7046 | 7081 | \end{itemdescr} |
7047 | 7082 |
|
7048 | 7083 | \rSec1[ratio]{Compile-time rational arithmetic} |
|
0 commit comments